Skip to content

Conversation

@frederikkofoed
Copy link

Problem
The orders_check_selection_applied_tax table generates a random UUID for records that lack a guid from the Toast API. Since this random ID is part of the primary key, every sync treats the same record as a new unique row, causing massively inflated Monthly Active Row (MAR) counts in Fivetran.

Solution
Changed to use a deterministic hash based on orders_check_selection_id and taxRate_id, ensuring the same record gets the same ID across syncs.

Changes

  • Added import hashlib (standard library, already used in other connectors in this repo)
  • Replaced uuid.uuid4() with an MD5 hash of parent_id + tax_rate_id in process_child() for orders_check_selection_applied_tax records

…use deterministic hash instead of random UUID
@frederikkofoed frederikkofoed requested a review from a team as a code owner January 15, 2026 22:07
@github-actions github-actions bot added the size/XS PR size: extra small label Jan 15, 2026
@cla-assistant
Copy link

cla-assistant bot commented Jan 15, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS PR size: extra small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant