multiwoven-integrations 0.34.14 → 0.34.15

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: af3f6a21444f5aa85047e82e0174fa7971c3999a9191641fc4c856eada85a8a8
4
- data.tar.gz: df145b18f1f9693eea22d24ff683c19f5aab138a0120691451eb18929f89cc27
3
+ metadata.gz: b0bc47bb18e9eb776b3e1b72ad711dddba187f2fb5d092deb0f8261dc17c250a
4
+ data.tar.gz: a49ddccf93fba66d26359af93f66b4a60f211e759e83f4da32eb9f555e359be7
5
5
  SHA512:
6
- metadata.gz: a9b2487bf3e5108110f35794faf4ea49f4d1769aec463d552170347191cdac7856a5bf42d116dbaf38a9ede5f7fff569ac56edaae92acf0da0b53f6231f4a514
7
- data.tar.gz: 3130acccdbe8f24751d263a7126c5c9394eadca7e731f7c1e8e97c5f127227058af5741a5ff728bdfef90254e4fb8a31b363505a0a39b99fd0d6388a1e8ac834
6
+ metadata.gz: 4445bb6e997771cdfe4f9113ca2a1fe444ac6825aad43ea013a1a74b86abc853738c851cf86d47dc6d975cb15e0bb96b7be9010bf00f76719e821cc7bcc8b65f
7
+ data.tar.gz: bd04c9011ab5eafd34bf9bc2019b03b6948fe6dfc31302b19d05a98dd97f7138e04162a6ca0bd394ee8888a9d8e1f34b61e9f360eadfefe179fbc3ba6cbf6302
@@ -43,11 +43,18 @@ module Multiwoven::Integrations::Destination
43
43
  private
44
44
 
45
45
  def create_connection(connection_config)
46
- Aws::S3::Client.new(
46
+ connection_config = connection_config.with_indifferent_access
47
+ s3_options = {
47
48
  region: connection_config[:region],
48
49
  access_key_id: connection_config[:access_key_id],
49
50
  secret_access_key: connection_config[:secret_access_key]
50
- )
51
+ }
52
+ endpoint = connection_config[:endpoint].to_s.strip
53
+ if endpoint.present?
54
+ s3_options[:endpoint] = endpoint
55
+ s3_options[:force_path_style] = connection_config[:path_style] == true
56
+ end
57
+ Aws::S3::Client.new(**s3_options)
51
58
  end
52
59
 
53
60
  def upload_csv_content(sync_config, records)
@@ -50,6 +50,20 @@
50
50
  "order": 6,
51
51
  "enum": ["csv"],
52
52
  "default": "csv"
53
+ },
54
+ "endpoint": {
55
+ "description": "Custom S3-compatible endpoint URL (e.g. http://localhost:9000 for MinIO). Leave empty for AWS S3.",
56
+ "type": "string",
57
+ "title": "Custom Endpoint",
58
+ "examples": ["http://localhost:9000"],
59
+ "order": 7
60
+ },
61
+ "path_style": {
62
+ "description": "Use path-style bucket URLs. Required for MinIO and some S3-compatible stores when using a custom endpoint.",
63
+ "type": "boolean",
64
+ "title": "Path Style",
65
+ "default": false,
66
+ "order": 8
53
67
  }
54
68
  }
55
69
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Multiwoven
4
4
  module Integrations
5
- VERSION = "0.34.14"
5
+ VERSION = "0.34.15"
6
6
 
7
7
  ENABLED_SOURCES = %w[
8
8
  Snowflake
@@ -9,7 +9,6 @@ module Multiwoven::Integrations::Source
9
9
  def check_connection(connection_config)
10
10
  connection_config = connection_config.with_indifferent_access
11
11
  @session_name = "connection-#{connection_config[:region]}-#{connection_config[:bucket]}"
12
-
13
12
  if unstructured_data?(connection_config)
14
13
  create_s3_connection(connection_config)
15
14
  @s3_resource.bucket(connection_config[:bucket]).objects.limit(1).first
@@ -90,11 +89,18 @@ module Multiwoven::Integrations::Source
90
89
  # Get authentication credentials
91
90
  auth_data = get_auth_data(connection_config)
92
91
 
93
- # Create S3 resource for easier operations
94
- @s3_resource = Aws::S3::Resource.new(
92
+ # Build client options; use custom endpoint when provided (e.g. MinIO)
93
+ s3_options = {
95
94
  region: connection_config[:region],
96
95
  credentials: auth_data
97
- )
96
+ }
97
+ endpoint = connection_config[:endpoint].to_s.strip
98
+ if endpoint.present?
99
+ s3_options[:endpoint] = endpoint
100
+ s3_options[:force_path_style] = connection_config[:path_style] == true
101
+ end
102
+
103
+ @s3_resource = Aws::S3::Resource.new(**s3_options)
98
104
  end
99
105
 
100
106
  def create_connection(connection_config)
@@ -104,17 +110,30 @@ module Multiwoven::Integrations::Source
104
110
  conn = DuckDB::Database.open.connect
105
111
  # Install and/or Load the HTTPFS extension
106
112
  conn.execute(INSTALL_HTTPFS_QUERY)
107
- # Set up S3 configuration
108
- secret_query = "
109
- CREATE SECRET amazons3_source (
110
- TYPE S3,
111
- KEY_ID '#{auth_data.credentials.access_key_id}',
112
- SECRET '#{auth_data.credentials.secret_access_key}',
113
- REGION '#{connection_config[:region]}',
114
- SESSION_TOKEN '#{auth_data.credentials.session_token}'
115
- );
116
- "
113
+ # Set up S3 configuration (optional custom endpoint for MinIO / S3-compatible stores)
114
+ secret_parts = [
115
+ "TYPE S3",
116
+ "KEY_ID '#{auth_data.credentials.access_key_id.gsub("'", "''")}'",
117
+ "SECRET '#{auth_data.credentials.secret_access_key.gsub("'", "''")}'",
118
+ "REGION '#{connection_config[:region]}'"
119
+ ]
120
+ secret_parts << "SESSION_TOKEN '#{auth_data.credentials.session_token.gsub("'", "''")}'" if auth_data.credentials.session_token.present?
121
+ endpoint = connection_config[:endpoint].to_s.strip
122
+ if endpoint.present?
123
+ uri = URI.parse(endpoint)
124
+
125
+ # DuckDB expects host:port only
126
+ duckdb_endpoint = uri.host
127
+ duckdb_endpoint += ":#{uri.port}" if uri.port
128
+
129
+ secret_parts << "ENDPOINT '#{duckdb_endpoint}'"
130
+
131
+ # Disable SSL if http
132
+ secret_parts << "USE_SSL false" if uri.scheme == "http"
133
+ end
134
+ secret_query = "CREATE SECRET amazons3_source (#{secret_parts.join(", ")});"
117
135
  get_results(conn, secret_query)
136
+ conn.execute("SET s3_url_style = 'path';") if connection_config[:path_style].present?
118
137
  conn
119
138
  end
120
139
 
@@ -113,6 +113,20 @@
113
113
  "parquet"
114
114
  ],
115
115
  "order": 8
116
+ },
117
+ "endpoint": {
118
+ "description": "Custom S3-compatible endpoint URL (e.g. http://localhost:9000 for MinIO). Leave empty for AWS S3.",
119
+ "type": "string",
120
+ "title": "Custom Endpoint",
121
+ "examples": ["http://localhost:9000"],
122
+ "order": 10
123
+ },
124
+ "path_style": {
125
+ "description": "Use path-style bucket URLs. Required for MinIO and some S3-compatible stores when using a custom endpoint.",
126
+ "type": "boolean",
127
+ "title": "Path Style",
128
+ "default": false,
129
+ "order": 11
116
130
  }
117
131
  }
118
132
  }
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.34.14
4
+ version: 0.34.15
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-12-15 00:00:00.000000000 Z
11
+ date: 2026-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport