Skip to content

Commit

Permalink
add sink name to generate_batch_id (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 authored Jan 21, 2025
1 parent b8026c2 commit d6d690f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target_api/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def make_batch_request(self, records: List[dict]):

def generate_batch_id(self):
index = math.ceil(self._total_records_read/self.max_size)
external_id = f"{os.environ.get('JOB_ROOT', 'job_Example')}:{index}"
external_id = f"{os.environ.get('JOB_ROOT', 'job_Example')}:{self.name}:{index}"
external_id = hashlib.md5(external_id.encode()).hexdigest()
return external_id

Expand Down

0 comments on commit d6d690f

Please sign in to comment.