multiwoven-integrations 0.18.0 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a182e10fe6151cdfbffef960e34aaf8b14be263a2f03a29c71e247d9125938a8
4
- data.tar.gz: 79e70b4fd2f81c406c2ca436bc45d422ad63ccd6489bf5c012a7b8ff601ddf21
3
+ metadata.gz: 872d35288639a0863bbe3e91a7413fd19194a60059155231c3afeb5bcc5710b4
4
+ data.tar.gz: f3237a02c7905a654a14074879215722bd9fc46fb62a5508a0511fd9dff2123e
5
5
  SHA512:
6
- metadata.gz: 3808200a5d1f51b873748399963d285053cd6830bcbeb1beb20f08d0eca91bea535a5c811092b767923282aa66ccc4adf6a754cf329b312ab5248475d6a9f042
7
- data.tar.gz: 436bee5b004c3b32b7232e28f4e75eefeeacd40d524c6d6b5bf4d4b7e2475638eba06e9bc96820c227c36c6ff33b624172f81cb7a8ffe78ad27040ff7ffbdad1
6
+ metadata.gz: aeebc66382aaf4c99c92940e7011a8f0f13fee3ade624e0e93ba98cd8c652368f90e485a92f4e1c526f543dc49beb48469d5642c1d86ab8e17fce14ee50521e7
7
+ data.tar.gz: 918f48630ce40ad37f0fd86bae8708a18646bc531abe88a844ae18c2ce06b759b942da4fd7c45947384df27629e733eab4288739eb611e3904efd22e2385a084
@@ -41,6 +41,8 @@ module Multiwoven
41
41
  SALESFORCE_OBJECTS.each do |object|
42
42
  object_description = @client.describe(object)
43
43
  streams << JSON.parse(SchemaHelper.create_json_schema_for_object(object_description).to_json)
44
+ rescue StandardError
45
+ next
44
46
  end
45
47
  catalog.to_multiwoven_message
46
48
  rescue StandardError => e
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.18.0"
5
+ VERSION = "0.18.2"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
@@ -31,6 +31,8 @@ module Multiwoven
31
31
  SALESFORCE_OBJECTS.each do |object|
32
32
  object_description = @client.describe(object)
33
33
  streams << JSON.parse(SchemaHelper.create_json_schema_for_object(object_description).to_json)
34
+ rescue StandardError
35
+ next
34
36
  end
35
37
  catalog.to_multiwoven_message
36
38
  rescue StandardError => e
@@ -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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiwoven-integrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subin T P