multiwoven-integrations 0.8.1 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/multiwoven/integrations/core/constants.rb +1 -1
- data/lib/multiwoven/integrations/destination/airtable/config/meta.json +1 -1
- data/lib/multiwoven/integrations/destination/databricks_lakehouse/config/meta.json +1 -1
- data/lib/multiwoven/integrations/destination/facebook_custom_audience/config/meta.json +1 -1
- data/lib/multiwoven/integrations/destination/http/config/meta.json +1 -1
- data/lib/multiwoven/integrations/destination/microsoft_excel/client.rb +9 -5
- data/lib/multiwoven/integrations/destination/microsoft_excel/config/catalog.json +1 -1
- data/lib/multiwoven/integrations/destination/oracle_db/config/meta.json +1 -1
- data/lib/multiwoven/integrations/rollout.rb +1 -1
- data/lib/multiwoven/integrations/source/databricks/config/meta.json +1 -1
- data/lib/multiwoven/integrations/source/oracle_db/config/meta.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5328da16858cd290955a6b993a1ee19285490298eeab3573b8ad55b3dacf7258
|
4
|
+
data.tar.gz: ef061954be00b3a90b5927f33e2633b05267968036123e743d5e3438ab4b18fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a74373e13a6a7f25385e675f8bad255383bfb937f60cb5f78b11512f4bcce749fa15da8f3c63530feeb0edfb5594a6270e857bc0d8975396de09a69f2ee9463
|
7
|
+
data.tar.gz: a3262d0ab25b5c7bc3d69f2499068c7fee1a7116c3fe07b23db26177b00e2572e3b721383ed70d2ab9118bf3c144af1b89cb6ce2b2c37f9081a0a18df12e7db5
|
@@ -40,7 +40,7 @@ module Multiwoven
|
|
40
40
|
MS_EXCEL_TABLE_ROW_WRITE_API = "https://graph.microsoft.com/v1.0/drives/%<drive_id>s/items/%<item_id>s/"\
|
41
41
|
"workbook/worksheets/%<sheet_name>s/tables/%<table_name>s/rows"
|
42
42
|
MS_EXCEL_TABLE_API = "https://graph.microsoft.com/v1.0/drives/%<drive_id>s/items/%<item_id>s/workbook/"\
|
43
|
-
"worksheets/
|
43
|
+
"worksheets/%<sheet_name>s/tables?$select=name"
|
44
44
|
MS_EXCEL_FILES_API = "https://graph.microsoft.com/v1.0/drives/%<drive_id>s/root/children"
|
45
45
|
MS_EXCEL_WORKSHEETS_API = "https://graph.microsoft.com/v1.0/drives/%<drive_id>s/items/%<item_id>s/"\
|
46
46
|
"workbook/worksheets"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"data": {
|
3
3
|
"name": "DatabricksLakehouse",
|
4
|
-
"title": "Databricks
|
4
|
+
"title": "Databricks Data Warehouse",
|
5
5
|
"connector_type": "destination",
|
6
6
|
"category": "Database",
|
7
7
|
"documentation_url": "https://docs.multiwoven.com/destinations/databricks_lakehouse",
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"name": "FacebookCustomAudience",
|
4
4
|
"title": "Facebook Custom Audiences",
|
5
5
|
"connector_type": "destination",
|
6
|
-
"category": "
|
6
|
+
"category": "Ad-Tech",
|
7
7
|
"documentation_url": "https://docs.mutliwoven.com",
|
8
8
|
"github_issue_label": "destination-facebook",
|
9
9
|
"icon": "icon.svg",
|
@@ -49,8 +49,7 @@ module Multiwoven::Integrations::Destination
|
|
49
49
|
excel_files = get_file(token, drive_id)
|
50
50
|
worksheet = excel_files.find { |file| file[:name] == file_name }
|
51
51
|
item_id = worksheet[:id]
|
52
|
-
|
53
|
-
table = get_table(token, drive_id, item_id)
|
52
|
+
table = get_table(token, drive_id, item_id, sheet_name)
|
54
53
|
write_url = format(MS_EXCEL_TABLE_ROW_WRITE_API, drive_id: drive_id, item_id: item_id, sheet_name: sheet_name,
|
55
54
|
table_name: table["name"])
|
56
55
|
payload = { values: records.map(&:values) }
|
@@ -69,8 +68,8 @@ module Multiwoven::Integrations::Destination
|
|
69
68
|
JSON.parse(response.body)["id"]
|
70
69
|
end
|
71
70
|
|
72
|
-
def get_table(token, drive_id, item_id)
|
73
|
-
table_url = format(MS_EXCEL_TABLE_API, drive_id: drive_id, item_id: item_id)
|
71
|
+
def get_table(token, drive_id, item_id, sheet_name)
|
72
|
+
table_url = format(MS_EXCEL_TABLE_API, drive_id: drive_id, item_id: item_id, sheet_name: sheet_name)
|
74
73
|
response = Multiwoven::Integrations::Core::HttpClient.request(
|
75
74
|
table_url,
|
76
75
|
HTTP_GET,
|
@@ -114,9 +113,14 @@ module Multiwoven::Integrations::Destination
|
|
114
113
|
headers: auth_headers(token)
|
115
114
|
)
|
116
115
|
sheets_data = JSON.parse(sheet_response.body)
|
116
|
+
column_names = if sheets_data.key?("error")
|
117
|
+
["Column A"]
|
118
|
+
else
|
119
|
+
sheets_data["values"].first
|
120
|
+
end
|
117
121
|
result << {
|
118
122
|
sheet_name: sheet_name,
|
119
|
-
column_names:
|
123
|
+
column_names: column_names
|
120
124
|
}
|
121
125
|
end
|
122
126
|
result
|
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.8.
|
4
|
+
version: 0.8.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: 2024-08-
|
11
|
+
date: 2024-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|