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: 5e47af6ddbbd4a1e2e19639fc52439083c966be41493c119abcb27650e575bdb
4
- data.tar.gz: 9850fe744b19bcc2fe9c043b009e4c2e7563b8005b489183de5e1ae76f5fda7d
3
+ metadata.gz: a7653eb7f6a4812fb36284aa6e55e37731f76d940b07158325a03e12d996d969
4
+ data.tar.gz: b4ef22d107598afabb138dfa39d65c5bcfdafaa487e3a686635cdff9dc98bdc0
5
5
  SHA512:
6
- metadata.gz: 18d90e4e8be760704494b76ad1442d618afc9c48c2e7ea376ffd48a36cf453618783801325f1660a441dbf69e3f2f63f606a96209461f9bcf28355cc8f636f15
7
- data.tar.gz: fbf22e1d8bf4df45131d61babe38feaadad34d23be924685a7c560cbcb109477e7f78761b180b60ee5ca8c78b31a35e3ecc193f9476826cf2ad13cf3203500a4
6
+ metadata.gz: 3b81998e0f918d3786799b25eb168c12faae940a25ff31d7245c0af096a09fa1d1e690cb450b3f9aea7d4f4981426490d5873adc086e56d96c677e3950f80a5f
7
+ data.tar.gz: 9ec66dffcca0cd3f239418f13ec045ffca7e394631f32e859ca687bc0795fcfa415ffbefcf047424891d8253a0ea853504614be08a2ddc09638aee2a53a0cc3f
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.18.1"
5
+ VERSION = "0.18.3"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "is_stream": {
18
18
  "type": "boolean",
19
- "title": "Streaming Enabled",
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
- adjusted_query = "SELECT #{columns} FROM read_csv_auto('#{@tempfile.path}') OFFSET #{offset}"
96
- adjusted_query += " LIMIT #{limit}" if limit
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.1
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-06 00:00:00.000000000 Z
11
+ date: 2025-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport