ingestr 0.13.43__py3-none-any.whl → 0.13.45__py3-none-any.whl

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.

Potentially problematic release.


This version of ingestr might be problematic. Click here for more details.

@@ -11,7 +11,6 @@ def attio_source(
11
11
  api_key: str,
12
12
  params: list[str],
13
13
  ) -> Iterable[DltResource]:
14
-
15
14
  attio_client = AttioClient(api_key)
16
15
 
17
16
  @dlt.resource(
ingestr/src/buildinfo.py CHANGED
@@ -1 +1 @@
1
- version = "v0.13.43"
1
+ version = "v0.13.45"
@@ -413,6 +413,10 @@ class S3Destination:
413
413
  raise MissingValueError("secret_access_key", "S3")
414
414
 
415
415
  endpoint_url = params.get("endpoint_url", [None])[0]
416
+ if endpoint_url is not None:
417
+ parsed_endpoint = urlparse(endpoint_url)
418
+ if not parsed_endpoint.scheme or not parsed_endpoint.netloc:
419
+ raise ValueError("Invalid endpoint_url. Must be a valid URL.")
416
420
 
417
421
  creds = AwsCredentials(
418
422
  aws_access_key_id=access_key_id,
@@ -420,8 +424,21 @@ class S3Destination:
420
424
  endpoint_url=endpoint_url,
421
425
  )
422
426
 
423
- dest_table = self.validate_table(kwargs["dest_table"])
427
+ dest_table = kwargs["dest_table"]
428
+
429
+ # only validate if dest_table is not a full URI
430
+ if not parsed_uri.netloc:
431
+ dest_table = self.validate_table(dest_table)
432
+
424
433
  table_parts = dest_table.split("/")
434
+
435
+ if parsed_uri.path.strip("/"):
436
+ path_parts = parsed_uri.path.strip("/ ").split("/")
437
+ table_parts = path_parts + table_parts
438
+
439
+ if parsed_uri.netloc:
440
+ table_parts.insert(0, parsed_uri.netloc.strip())
441
+
425
442
  base_path = "/".join(table_parts[:-1])
426
443
 
427
444
  opts = {
@@ -444,10 +461,9 @@ class S3Destination:
444
461
  return table
445
462
 
446
463
  def dlt_run_params(self, uri: str, table: str, **kwargs):
447
- table = self.validate_table(table)
448
464
  table_parts = table.split("/")
449
465
  return {
450
- "table_name": table_parts[-1],
466
+ "table_name": table_parts[-1].strip(),
451
467
  }
452
468
 
453
469
  def post_load(self) -> None:
@@ -1,6 +1,7 @@
1
1
  import requests
2
2
  from dlt.sources.helpers.requests import Client
3
3
 
4
+
4
5
  def create_client() -> requests.Session:
5
6
  return Client(
6
7
  raise_for_status=False,
ingestr/src/sources.py CHANGED
@@ -70,6 +70,8 @@ class SqlSource:
70
70
  range_start="closed",
71
71
  )
72
72
 
73
+ engine_adapter_callback = None
74
+
73
75
  if uri.startswith("mysql://"):
74
76
  uri = uri.replace("mysql://", "mysql+pymysql://")
75
77
 
@@ -156,6 +158,11 @@ class SqlSource:
156
158
 
157
159
  uri = f"spanner+spanner:///projects/{project_id}/instances/{instance_id}/databases/{database}"
158
160
 
161
+ def eng_callback(engine):
162
+ return engine.execution_options(read_only=True)
163
+
164
+ engine_adapter_callback = eng_callback
165
+
159
166
  from dlt.common.libs.sql_alchemy import (
160
167
  Engine,
161
168
  MetaData,
@@ -288,6 +295,7 @@ class SqlSource:
288
295
  kwargs.get("sql_exclude_columns", [])
289
296
  ),
290
297
  defer_table_reflect=defer_table_reflect,
298
+ engine_adapter_callback=engine_adapter_callback,
291
299
  )
292
300
 
293
301
  return builder_res
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ingestr
3
- Version: 0.13.43
3
+ Version: 0.13.45
4
4
  Summary: ingestr is a command-line application that ingests data from various sources and stores them in any database.
5
5
  Project-URL: Homepage, https://github.com/bruin-data/ingestr
6
6
  Project-URL: Issues, https://github.com/bruin-data/ingestr/issues
@@ -2,16 +2,16 @@ ingestr/conftest.py,sha256=Q03FIJIZpLBbpj55cfCHIKEjc1FCvWJhMF2cidUJKQU,1748
2
2
  ingestr/main.py,sha256=Pe_rzwcDRKIYa7baEVUAAPOHyqQbX29RUexMl0F_S1k,25273
3
3
  ingestr/src/.gitignore,sha256=8cX1AZTSI0TcdZFGTmS_oyBjpfCzhOEt0DdAo2dFIY8,203
4
4
  ingestr/src/blob.py,sha256=onMe5ZHxPXTdcB_s2oGNdMo-XQJ3ajwOsWE9eSTGFmc,1495
5
- ingestr/src/buildinfo.py,sha256=af3TiaPbJzAW9JyfpOIeOvjzAsiboFF4f1frweJenxc,21
6
- ingestr/src/destinations.py,sha256=MctbeJUyNr0DRB0XYt2xAbEKkHZ40-nXXEOYCs4KuoE,15420
5
+ ingestr/src/buildinfo.py,sha256=i03DTki4HIu309r3IT3QLSdXRcY9kQc00bvO9cKmJqw,21
6
+ ingestr/src/destinations.py,sha256=41Bj1UgxR8a2KcZWqtGw74AKZKnSBrueQRnBdrf3c-A,16003
7
7
  ingestr/src/errors.py,sha256=Ufs4_DfE77_E3vnA1fOQdi6cmuLVNm7_SbFLkL1XPGk,686
8
8
  ingestr/src/factory.py,sha256=c5WfqmRrXFj1PddnBOzTzzZUHJ-Fb42cvCvsBEqn6Yo,5682
9
9
  ingestr/src/filters.py,sha256=C-_TIVkF_cxZBgG-Run2Oyn0TAhJgA8IWXZ-OPY3uek,1136
10
- ingestr/src/http_client.py,sha256=dbAAf6Ptxf9pSn9RmNSHL4HEn5xhFimWjE2JZ67J00o,434
10
+ ingestr/src/http_client.py,sha256=UwPiv95EfHPdT4525xeLFJ1AYlf-cyaHKRU-2QnZt2o,435
11
11
  ingestr/src/loader.py,sha256=9NaWAyfkXdqAZSS-N72Iwo36Lbx4PyqIfaaH1dNdkFs,1712
12
12
  ingestr/src/partition.py,sha256=BrIP6wFJvyR7Nus_3ElnfxknUXeCipK_E_bB8kZowfc,969
13
13
  ingestr/src/resource.py,sha256=XG-sbBapFVEM7OhHQFQRTdTLlh-mHB-N4V1t8F8Tsww,543
14
- ingestr/src/sources.py,sha256=HZQGWPuDdf4sVq91KuaJ9p7MtSfjWue8d2vknZpIwg8,83456
14
+ ingestr/src/sources.py,sha256=sqxRdM8HVolsadbGLXvjWAtyXgzU0LOqQeaPQ_bjHk0,83712
15
15
  ingestr/src/table_definition.py,sha256=REbAbqdlmUMUuRh8nEQRreWjPVOQ5ZcfqGkScKdCrmk,390
16
16
  ingestr/src/time.py,sha256=H_Fk2J4ShXyUM-EMY7MqCLZQhlnZMZvO952bmZPc4yE,254
17
17
  ingestr/src/version.py,sha256=J_2xgZ0mKlvuHcjdKCx2nlioneLH0I47JiU_Slr_Nwc,189
@@ -31,7 +31,7 @@ ingestr/src/arrow/__init__.py,sha256=8fEntgHseKjFMiPQIzxYzw_raicNsEgnveLi1IzBca0
31
31
  ingestr/src/asana_source/__init__.py,sha256=QwQTCb5PXts8I4wLHG9UfRP-5ChfjSe88XAVfxMV5Ag,8183
32
32
  ingestr/src/asana_source/helpers.py,sha256=PukcdDQWIGqnGxuuobbLw4hUy4-t6gxXg_XywR7Lg9M,375
33
33
  ingestr/src/asana_source/settings.py,sha256=-2tpdkwh04RvLKFvwQodnFLYn9MaxOO1hsebGnDQMTU,2829
34
- ingestr/src/attio/__init__.py,sha256=Dvr9rSZUlw6HGsqF7iabUit-xRC17Nv6QcmA4cRF2wA,2864
34
+ ingestr/src/attio/__init__.py,sha256=D21EK02HQxDtHoJHVHtM01sU4ZSK26WzFjLqqpVDdK0,2859
35
35
  ingestr/src/attio/helpers.py,sha256=QvB-0BV_Z-cvMTBZDwOCuhxY1cB5PraPdrDkNyQ5TsM,1715
36
36
  ingestr/src/chess/__init__.py,sha256=y0Q8aKBigeKf3N7wuB_gadMQjVJzBPUT8Jhp1ObEWjk,6812
37
37
  ingestr/src/chess/helpers.py,sha256=v1HTImOMjAF7AzZUPDIuHu00e7ut0o5y1kWcVYo4QZw,549
@@ -131,8 +131,8 @@ ingestr/testdata/delete_insert_part2.csv,sha256=B_KUzpzbNdDY_n7wWop1mT2cz36TmayS
131
131
  ingestr/testdata/merge_expected.csv,sha256=DReHqWGnQMsf2PBv_Q2pfjsgvikYFnf1zYcQZ7ZqYN0,276
132
132
  ingestr/testdata/merge_part1.csv,sha256=Pw8Z9IDKcNU0qQHx1z6BUf4rF_-SxKGFOvymCt4OY9I,185
133
133
  ingestr/testdata/merge_part2.csv,sha256=T_GiWxA81SN63_tMOIuemcvboEFeAmbKc7xRXvL9esw,287
134
- ingestr-0.13.43.dist-info/METADATA,sha256=n3hm9A9kfuALzOs9t2f4V2X4LH3hcIyFnj5y0DYP9Qo,13852
135
- ingestr-0.13.43.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
136
- ingestr-0.13.43.dist-info/entry_points.txt,sha256=oPJy0KBnPWYjDtP1k8qwAihcTLHSZokSQvRAw_wtfJM,46
137
- ingestr-0.13.43.dist-info/licenses/LICENSE.md,sha256=cW8wIhn8HFE-KLStDF9jHQ1O_ARWP3kTpk_-eOccL24,1075
138
- ingestr-0.13.43.dist-info/RECORD,,
134
+ ingestr-0.13.45.dist-info/METADATA,sha256=TE5w09S7AIMd7ohApFX1_3uB6a-AgDPl-ztOnHv0Lwg,13852
135
+ ingestr-0.13.45.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
136
+ ingestr-0.13.45.dist-info/entry_points.txt,sha256=oPJy0KBnPWYjDtP1k8qwAihcTLHSZokSQvRAw_wtfJM,46
137
+ ingestr-0.13.45.dist-info/licenses/LICENSE.md,sha256=cW8wIhn8HFE-KLStDF9jHQ1O_ARWP3kTpk_-eOccL24,1075
138
+ ingestr-0.13.45.dist-info/RECORD,,