ingestr 0.13.43__py3-none-any.whl → 0.13.44__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.

ingestr/src/buildinfo.py CHANGED
@@ -1 +1 @@
1
- version = "v0.13.43"
1
+ version = "v0.13.44"
@@ -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,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ingestr
3
- Version: 0.13.43
3
+ Version: 0.13.44
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,8 +2,8 @@ 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=OPkL7VFHFQshQEKAR1PO1Cv4UtyYa4D2hv4hxj0DVK8,21
6
+ ingestr/src/destinations.py,sha256=fC6W_1lqNDVKRimUYDhAnEy4LP3yk8OfAHVViRbGW94,16015
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
@@ -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.44.dist-info/METADATA,sha256=oIJqHNawuqTK_coB0V7N0SozLIaC8pSc36AulUDGq3Q,13852
135
+ ingestr-0.13.44.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
136
+ ingestr-0.13.44.dist-info/entry_points.txt,sha256=oPJy0KBnPWYjDtP1k8qwAihcTLHSZokSQvRAw_wtfJM,46
137
+ ingestr-0.13.44.dist-info/licenses/LICENSE.md,sha256=cW8wIhn8HFE-KLStDF9jHQ1O_ARWP3kTpk_-eOccL24,1075
138
+ ingestr-0.13.44.dist-info/RECORD,,