multiwoven-integrations 0.22.4 → 0.22.6
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: 628d3d2a1b71bab5cef589987bb4e79d18c4c8f1d369c02ce50e034012f1b971
|
4
|
+
data.tar.gz: ed15cd0bb0559211dfdbbed3da6b1d0a9a2779ff2e5d5698e36ec61153674587
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f18aa466ffef4f76668b8e21c9f2af3870e212720e279cc020f4f5128b60afc4dd52bd01ba39d41f072dbb14fcbe82a971ae3aca3ed12ccbda23f252ac19f8c
|
7
|
+
data.tar.gz: 11a7f8ef5abf7ee22a19d35a73711268d95ef67541fe25843215ce85c33e680ec0548b9375c4d878c59222af724187d5c52be1186a1aab137484f21c5187a337
|
@@ -54,7 +54,14 @@ module Multiwoven::Integrations::Source
|
|
54
54
|
|
55
55
|
url = build_url(DATABRICKS_SERVING_URL, connection_config)
|
56
56
|
token = connection_config[:token]
|
57
|
-
|
57
|
+
|
58
|
+
response = send_request(
|
59
|
+
url: url,
|
60
|
+
http_method: HTTP_POST,
|
61
|
+
payload: payload,
|
62
|
+
headers: auth_headers(token),
|
63
|
+
config: connection_config[:config]
|
64
|
+
)
|
58
65
|
process_response(response)
|
59
66
|
rescue StandardError => e
|
60
67
|
handle_exception(e, context: "DATABRICKS MODEL:RUN_MODEL:EXCEPTION", type: "error")
|
@@ -77,15 +84,6 @@ module Multiwoven::Integrations::Source
|
|
77
84
|
format(url, databricks_host: connection_config[:databricks_host],
|
78
85
|
endpoint_name: connection_config[:endpoint])
|
79
86
|
end
|
80
|
-
|
81
|
-
def send_request(url, token, payload)
|
82
|
-
Multiwoven::Integrations::Core::HttpClient.request(
|
83
|
-
url,
|
84
|
-
HTTP_POST,
|
85
|
-
payload: payload,
|
86
|
-
headers: auth_headers(token)
|
87
|
-
)
|
88
|
-
end
|
89
87
|
end
|
90
88
|
end
|
91
89
|
end
|
@@ -29,19 +29,33 @@
|
|
29
29
|
"type": "string",
|
30
30
|
"order": 2
|
31
31
|
},
|
32
|
+
"config": {
|
33
|
+
"title": "",
|
34
|
+
"type": "object",
|
35
|
+
"properties": {
|
36
|
+
"timeout": {
|
37
|
+
"type": "string",
|
38
|
+
"default": "30",
|
39
|
+
"title": "HTTP Timeout",
|
40
|
+
"description": "The maximum time, in seconds, to wait for a response from the server before the request is canceled.",
|
41
|
+
"order": 0
|
42
|
+
}
|
43
|
+
},
|
44
|
+
"order": 3
|
45
|
+
},
|
32
46
|
"request_format": {
|
33
47
|
"title": "Request Format",
|
34
48
|
"description": "Sample Request Format",
|
35
49
|
"type": "string",
|
36
50
|
"x-request-format": true,
|
37
|
-
"order":
|
51
|
+
"order": 4
|
38
52
|
},
|
39
53
|
"response_format": {
|
40
54
|
"title": "Response Format",
|
41
55
|
"description": "Sample Response Format",
|
42
56
|
"type": "string",
|
43
57
|
"x-response-format": true,
|
44
|
-
"order":
|
58
|
+
"order": 5
|
45
59
|
}
|
46
60
|
}
|
47
61
|
}
|
@@ -88,8 +88,10 @@ module Multiwoven::Integrations::Source
|
|
88
88
|
def query(conn, query)
|
89
89
|
@sftp.download!(@remote_file_path, @tempfile.path)
|
90
90
|
if query.gsub(/FROM\s+\S+/i).count > 1
|
91
|
-
|
91
|
+
# multiple select/from with trailing closing parenthesis (replacing first occurrence in reverse)
|
92
|
+
query = query.reverse.sub(/\S+\s+MORF/i, "FROM read_csv_auto('#{@tempfile.path}'))".reverse).reverse
|
92
93
|
elsif query.match?(/\bFROM\b/i)
|
94
|
+
# single select statement
|
93
95
|
query = query.gsub(/FROM\s+\S+/i, "FROM read_csv_auto('#{@tempfile.path}')")
|
94
96
|
end
|
95
97
|
records = get_results(conn, query)
|
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.22.
|
4
|
+
version: 0.22.6
|
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-04-
|
11
|
+
date: 2025-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|