multiwoven-integrations 0.18.1 → 0.18.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7653eb7f6a4812fb36284aa6e55e37731f76d940b07158325a03e12d996d969
|
4
|
+
data.tar.gz: b4ef22d107598afabb138dfa39d65c5bcfdafaa487e3a686635cdff9dc98bdc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b81998e0f918d3786799b25eb168c12faae940a25ff31d7245c0af096a09fa1d1e690cb450b3f9aea7d4f4981426490d5873adc086e56d96c677e3950f80a5f
|
7
|
+
data.tar.gz: 9ec66dffcca0cd3f239418f13ec045ffca7e394631f32e859ca687bc0795fcfa415ffbefcf047424891d8253a0ea853504614be08a2ddc09638aee2a53a0cc3f
|
@@ -16,7 +16,7 @@
|
|
16
16
|
},
|
17
17
|
"is_stream": {
|
18
18
|
"type": "boolean",
|
19
|
-
"title": "
|
19
|
+
"title": "Enable streaming",
|
20
20
|
"description": "Enables data streaming for such as chat, when supported by the model. When true, messages and model data are processed in chunks for immediate delivery, enhancing responsiveness. Default is false, processing only after the entire response is received.",
|
21
21
|
"default": false,
|
22
22
|
"order": 1
|
@@ -86,15 +86,9 @@ module Multiwoven::Integrations::Source
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def query(conn, query)
|
89
|
-
query_regex = /\ASELECT\s+(?<columns>[\w,\s]+)\s+FROM\s+\w+\s*(?:LIMIT\s+(?<limit>\d+))?\s*(?:OFFSET\s+(?<offset>\d+))?\z/i
|
90
|
-
match = query.match(query_regex)
|
91
|
-
columns = match[:columns] || "*"
|
92
|
-
offset = match[:offset].to_i || 0
|
93
|
-
limit = match[:limit]&.to_i || nil
|
94
89
|
@sftp.download!(@remote_file_path, @tempfile.path)
|
95
|
-
|
96
|
-
|
97
|
-
records = get_results(conn, adjusted_query)
|
90
|
+
query = query.gsub(/FROM\s+\S+/i, "FROM read_csv_auto('#{@tempfile.path}')") if query.match?(/\bFROM\b/i)
|
91
|
+
records = get_results(conn, query)
|
98
92
|
records.map do |row|
|
99
93
|
RecordMessage.new(data: row, emitted_at: Time.now.to_i).to_multiwoven_message
|
100
94
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
"connection_specification": {
|
5
5
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
6
6
|
"title": "SFTP",
|
7
|
-
"required": ["host", "username", "password", "file_path", "format_type" ],
|
7
|
+
"required": ["host", "username", "password", "file_path", "file_name", "format_type" ],
|
8
8
|
"properties": {
|
9
9
|
"host": {
|
10
10
|
"title": "Host",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multiwoven-integrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Subin T P
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|