multiwoven-integrations 0.1.72 → 0.1.74

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: 145e9dbf372280297517b8ca9ae1e7aa5b36807d3e22b7935565a150e952498e
4
- data.tar.gz: dabf94ddf1c14e138a5c07378484aaa5bb58194cd58532eb70ad2cdd7d9e0361
3
+ metadata.gz: 7c7b0b9a8d6a1458eef924831e842a8e78fdaafc9b8f2977da6b5f23f6a465a2
4
+ data.tar.gz: 2db159c6afe7267c5d41ef179220ddc40dc84832aa8c76d949c191924d2dd44b
5
5
  SHA512:
6
- metadata.gz: c26f8408f8e525c7c607ecc5d78a31ccde1ff6e518e30859c2247622c05e12d681fde3d863bb59c6cec29494e242f7a08cdde4dc59e334e3d2fc5f4090f2ceae
7
- data.tar.gz: 16072217e59ce1af0e019dde252282515219420a3428fa57a0e0fdce51d754602bdbb6c657fd1030650f29fd401f4e4deffd210f28bd1e02e4354e02ce8fff80
6
+ metadata.gz: 54fe61b48f851d3b211e1b26db1280e76b76d5b6f25df33e57d841626f06490431f94279f207d76369f036bd8602d947bed0a5e2e44aa6cc07743acee87d2c7a
7
+ data.tar.gz: 89b9dc4e5670c9606cce6624c73552e8168443ab2ace1778202759eba6f79c522da3ce02eea469150fd05b2b3b7bdf8d873956aa049adddca1ac8bf487e41a11
@@ -5,7 +5,7 @@ module Multiwoven
5
5
  class DestinationConnector < BaseConnector
6
6
  # Records are transformed json payload send it to the destination
7
7
  # SyncConfig is the Protocol::SyncConfig object
8
- def write(_sync_config, _records, _action = "insert")
8
+ def write(_sync_config, _records, _action = "destination_insert")
9
9
  raise "Not implemented"
10
10
  # return Protocol::TrackingMessage
11
11
  end
@@ -3,7 +3,7 @@
3
3
  module Multiwoven
4
4
  module Integrations::Core
5
5
  module Fullrefresher
6
- def write(sync_config, records, action = "insert")
6
+ def write(sync_config, records, action = "destination_insert")
7
7
  if sync_config && sync_config.sync_mode == "full_refresh" && !@full_refreshed
8
8
  response = clear_all_records(sync_config)
9
9
  return response unless response &&
@@ -3,16 +3,22 @@
3
3
  module Multiwoven
4
4
  module Integrations::Core
5
5
  class QueryBuilder
6
+ include Utils
7
+
6
8
  def self.perform(action, table, record, primary_key = nil)
7
9
  case action.downcase
8
- when "insert"
10
+ when "destination_insert"
9
11
  columns = record.keys.join(", ")
10
12
  values = record.values.map { |value| "'#{value}'" }.join(", ")
11
13
  # TODO: support bulk insert
12
14
  "INSERT INTO #{table} (#{columns}) VALUES (#{values});"
13
- when "update"
15
+ when "destination_update"
14
16
  # Ensure primary key is a string and exists within record for the WHERE clause
15
- return "Primary key '#{primary_key}' not found in record." if record[primary_key].nil?
17
+ if record[primary_key].nil?
18
+ error_message = "Primary key '#{primary_key}' not found in record."
19
+ Integrations::Service.logger.error(error_message)
20
+ return error_message
21
+ end
16
22
 
17
23
  primary_key_value = record.delete(primary_key) # Remove and return the primary key value
18
24
  set_clause = record.map { |key, value| "#{key} = '#{value}'" }.join(", ")
@@ -3,7 +3,7 @@
3
3
  module Multiwoven
4
4
  module Integrations::Core
5
5
  module RateLimiter
6
- def write(sync_config, records, action = "insert")
6
+ def write(sync_config, records, action = "destination_insert")
7
7
  stream = sync_config.stream
8
8
 
9
9
  @queue ||= Limiter::RateQueue.new(stream.request_rate_limit, interval: stream.rate_limit_unit_seconds) do
@@ -35,7 +35,7 @@ module Multiwoven::Integrations::Destination
35
35
  })
36
36
  end
37
37
 
38
- def write(sync_config, records, _action = "insert")
38
+ def write(sync_config, records, _action = "destination_insert")
39
39
  connection_config = sync_config.destination.connection_specification.with_indifferent_access
40
40
  access_token = connection_config[:access_token]
41
41
  url = generate_url(sync_config, connection_config)
@@ -31,7 +31,7 @@ module Multiwoven::Integrations::Destination
31
31
  })
32
32
  end
33
33
 
34
- def write(sync_config, records, _action = "insert")
34
+ def write(sync_config, records, _action = "destination_insert")
35
35
  connection_config = sync_config.destination.connection_specification.with_indifferent_access
36
36
  connection_config = connection_config.with_indifferent_access
37
37
  url = sync_config.stream.url
@@ -42,7 +42,7 @@ module Multiwoven::Integrations::Destination
42
42
  db&.close
43
43
  end
44
44
 
45
- def write(sync_config, records, action = "insert")
45
+ def write(sync_config, records, action = "destination_insert")
46
46
  connection_config = sync_config.destination.connection_specification.with_indifferent_access
47
47
  table_name = sync_config.stream.name
48
48
  db = create_connection(connection_config)
@@ -36,7 +36,7 @@ module Multiwoven::Integrations::Destination
36
36
  })
37
37
  end
38
38
 
39
- def write(sync_config, records, _action = "insert")
39
+ def write(sync_config, records, _action = "destination_insert")
40
40
  @sync_config = sync_config
41
41
  connection_config = sync_config.destination.connection_specification.with_indifferent_access
42
42
  file_path = generate_file_path(sync_config)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.1.72"
5
+ VERSION = "0.1.74"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
@@ -1,4 +1,25 @@
1
- <svg height="2222" viewBox="0 0 9 8" width="2500" xmlns="http://www.w3.org/2000/svg">
2
- <path d="m0 7h1v1h-1z" fill="#f00"/>
3
- <path d="m0 0h1v7h-1zm2 0h1v8h-1zm2 0h1v8h-1zm2 0h1v8h-1zm2 3.25h1v1.5h-1z" fill="#fc0"/>
4
- </svg>
1
+ <svg height="100" width="100" version="1.1" id="Layer_1" xmlns:x="ns_extend;" xmlns:i="ns_ai;" xmlns:graph="ns_graphs;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 50.6 50.6" style="enable-background:new 0 0 50.6 50.6;" xml:space="preserve">
2
+ <metadata>
3
+ <sfw xmlns="ns_sfw;">
4
+ <slices>
5
+ </slices>
6
+ <sliceSourceBounds bottomLeftOrigin="true" height="50.6" width="50.6" x="0" y="0">
7
+ </sliceSourceBounds>
8
+ </sfw>
9
+ </metadata>
10
+ <g>
11
+ <g>
12
+ <path d="M0.6,0H5c0.3,0,0.6,0.3,0.6,0.6V50c0,0.3-0.3,0.6-0.6,0.6H0.6C0.3,50.6,0,50.4,0,50V0.6C0,0.3,0.3,0,0.6,0z" fill="yellow">
13
+ </path>
14
+ <path d="M11.8,0h4.4c0.3,0,0.6,0.3,0.6,0.6V50c0,0.3-0.3,0.6-0.6,0.6h-4.4c-0.3,0-0.6-0.3-0.6-0.6V0.6C11.3,0.3,11.5,0,11.8,0z" fill="yellow">
15
+ </path>
16
+ <path d="M23.1,0h4.4c0.3,0,0.6,0.3,0.6,0.6V50c0,0.3-0.3,0.6-0.6,0.6h-4.4c-0.3,0-0.6-0.3-0.6-0.6V0.6C22.5,0.3,22.8,0,23.1,0z" fill="yellow">
17
+ </path>
18
+ <path d="M34.3,0h4.4c0.3,0,0.6,0.3,0.6,0.6V50c0,0.3-0.3,0.6-0.6,0.6h-4.4c-0.3,0-0.6-0.3-0.6-0.6V0.6C33.7,0.3,34,0,34.3,0z" fill="yellow">
19
+ </path>
20
+ <path d="M45.6,19.7H50c0.3,0,0.6,0.3,0.6,0.6v10.1c0,0.3-0.3,0.6-0.6,0.6h-4.4c-0.3,0-0.6-0.3-0.6-0.6V20.3
21
+ C45,20,45.3,19.7,45.6,19.7z" fill="yellow">
22
+ </path>
23
+ </g>
24
+ </g>
25
+ </svg>
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.1.72
4
+ version: 0.1.74
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: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport