hotglue-singer-sdk 1.0.2__py3-none-any.whl → 1.0.4__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.
@@ -1,5 +1,6 @@
1
1
  """HotglueTarget target class."""
2
2
 
3
+ from __future__ import annotations
3
4
  import click
4
5
  import copy
5
6
  import time
@@ -220,6 +221,18 @@ class TargetHotglue(Target):
220
221
  ):
221
222
  continue
222
223
 
224
+ ref_external_id = record.get(field)
225
+ if ref_external_id:
226
+ sink_bookmarks = (self._latest_state or {}).get("bookmarks", {}).get(object_name)
227
+ cur_record_state = next(
228
+ (x for x in sink_bookmarks if x.get("externalId") == ref_external_id),
229
+ None
230
+ ) if sink_bookmarks else None
231
+
232
+ if cur_record_state and cur_record_state.get("id"):
233
+ record[field] = cur_record_state.get("id")
234
+ continue
235
+
223
236
  relation_snapshot = None
224
237
 
225
238
  relation_path_csv = f"{SNAPSHOT_DIR}/{object_name}_{flow_id}.snapshot.csv"
@@ -421,7 +434,7 @@ class TargetHotglue(Target):
421
434
  """
422
435
  self.logger.info(f"Target '{self.name}' is listening for input from tap.")
423
436
 
424
- stats: dict[str, int] = defaultdict(int)
437
+ stats: Dict[str, int] = defaultdict(int)
425
438
  for line in file_input:
426
439
  # Check if shutdown has been requested
427
440
  if hasattr(self, '_shutdown_requested') and self._shutdown_requested.is_set():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hotglue-singer-sdk
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: A framework for building Singer taps and targets
5
5
  License: Apache 2.0
6
6
  License-File: LICENSE
@@ -43,11 +43,11 @@ hotglue_singer_sdk/target_sdk/common.py,sha256=l2ldX1qXxbzvjeaicu0If0CUMV_bmX2OV
43
43
  hotglue_singer_sdk/target_sdk/lambda.py,sha256=LyYFS39r0zmCBbUEEwcueLOWI2L2YiKlfob8-dU9jMs,3685
44
44
  hotglue_singer_sdk/target_sdk/rest.py,sha256=3PUOx7pWg7DfbMonu2wiiQqU5mcN49B-_1mvQVgL4Gc,3607
45
45
  hotglue_singer_sdk/target_sdk/sinks.py,sha256=-nm5hSLkfma6-BbBlZVJih7lwktQ7BRa9zw9TkmUdwo,464
46
- hotglue_singer_sdk/target_sdk/target.py,sha256=AyH1AIXmfLZYT-biq1aSBMkGC2OpQyCtCAYSBXia6Bs,22921
46
+ hotglue_singer_sdk/target_sdk/target.py,sha256=uVqmXmyIO-h3M8VCiZ1McPXczZj7EU0PO33DCOMyj5g,23559
47
47
  hotglue_singer_sdk/target_sdk/target_base.py,sha256=LyQQndYGlzu5LcIj-MMcmcjdGAmAYVgvdNAxvCgFpvk,22022
48
48
  hotglue_singer_sdk/testing.py,sha256=BifsP9X83pgKdfynI5CComchoRWEHpe81h-UfOwK_G0,5860
49
49
  hotglue_singer_sdk/typing.py,sha256=jTGFhON9uBZe9e0vHH6-6rjeD2YrpzolPiYigIuo7zU,16186
50
- hotglue_singer_sdk-1.0.2.dist-info/METADATA,sha256=3av4tDpNLnUzBEoYiKPJGdR6U0CbPB4yiCn2oTMyxC8,2376
51
- hotglue_singer_sdk-1.0.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
52
- hotglue_singer_sdk-1.0.2.dist-info/licenses/LICENSE,sha256=BGsDEGu628ZSlSfJzr3RshF0_KTW-E1Z--XnqjioYWg,11337
53
- hotglue_singer_sdk-1.0.2.dist-info/RECORD,,
50
+ hotglue_singer_sdk-1.0.4.dist-info/METADATA,sha256=Pscfl0Ojzj1ST8rmlNRSV1SmanH9URKmuUWq-0Bl95M,2376
51
+ hotglue_singer_sdk-1.0.4.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
52
+ hotglue_singer_sdk-1.0.4.dist-info/licenses/LICENSE,sha256=BGsDEGu628ZSlSfJzr3RshF0_KTW-E1Z--XnqjioYWg,11337
53
+ hotglue_singer_sdk-1.0.4.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.1
2
+ Generator: poetry-core 2.3.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any