multiwoven-integrations 0.5.0 → 0.5.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fdecb7677ac11971794080ac898200969ee1b243e917ccba7f1c7ce254ebdcb5
|
|
4
|
+
data.tar.gz: f609d9a9cfcef3644b07352d6704c713070046c5b8e405017e3e7f8c11d112e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98d9e5c0028a6e6d3b45584ba8cbd01778040ec0a2a7cf77a1dc2e1a326735df427021300e3b7cf412ee270e8bbe67101c9148cf203518d6504f1af6fd32b2cd
|
|
7
|
+
data.tar.gz: f4aece39d2bdcb2901b2c9981e1ad4ca6ddb24333b8ab057b2fdd275c3496404569ac830abcd8d690f48ac39d493c661b305e119eee5a286d4dd211e8ba23d65
|
|
@@ -16,6 +16,8 @@ module Multiwoven
|
|
|
16
16
|
JSON_SCHEMA_URL = "https://json-schema.org/draft-07/schema#"
|
|
17
17
|
|
|
18
18
|
# CONNECTORS
|
|
19
|
+
INSTALL_HTTPFS_QUERY = ENV["INSTALL_HTTPFS_QUERY"] || "INSTALL HTTPFS; LOAD HTTPFS;"
|
|
20
|
+
|
|
19
21
|
KLAVIYO_AUTH_ENDPOINT = "https://a.klaviyo.com/api/lists/"
|
|
20
22
|
KLAVIYO_AUTH_PAYLOAD = {
|
|
21
23
|
data: {
|
|
@@ -102,7 +102,9 @@ module Multiwoven::Integrations::Destination
|
|
|
102
102
|
result[index][:tablename] = table_name
|
|
103
103
|
result[index][:columns] = [column_data]
|
|
104
104
|
end
|
|
105
|
-
result
|
|
105
|
+
result.values.group_by { |entry| entry[:tablename] }.transform_values do |entries|
|
|
106
|
+
{ tablename: entries.first[:tablename], columns: entries.flat_map { |entry| entry[:columns] } }
|
|
107
|
+
end
|
|
106
108
|
end
|
|
107
109
|
|
|
108
110
|
def tracking_message(success, failure)
|
|
@@ -74,6 +74,8 @@ module Multiwoven::Integrations::Source
|
|
|
74
74
|
@session_name = "preview-#{connection_config[:region]}-#{connection_config[:bucket]}" if @session_name.to_s.empty?
|
|
75
75
|
auth_data = get_auth_data(connection_config)
|
|
76
76
|
conn = DuckDB::Database.open.connect
|
|
77
|
+
# Install and/or Load the HTTPFS extension
|
|
78
|
+
conn.execute(INSTALL_HTTPFS_QUERY)
|
|
77
79
|
# Set up S3 configuration
|
|
78
80
|
secret_query = "
|
|
79
81
|
CREATE SECRET amazons3_source (
|