Skip to content

Added incremental predicates to Snowflakes tables#198

Open
luislema79 wants to merge 5 commits into
Datavault-UK:masterfrom
luislema79:master
Open

Added incremental predicates to Snowflakes tables#198
luislema79 wants to merge 5 commits into
Datavault-UK:masterfrom
luislema79:master

Conversation

@luislema79
Copy link
Copy Markdown

@luislema79 luislema79 commented Jun 4, 2023

Added incremental predicates to Snowflake satellites and hubs to limit the scan on the destination table (satellite/hub). When adding new records to a satellite the latest_records cte pulls data from your satellite without any filtering so it doesn't limit the amount of data it pulls and it scans all the partitions in the satellite. The same happens in the records_to_insert cte for a hub. For a big satellite/hub with billions of records, this process takes several minutes. If you don't scan the whole table you run the risk to insert duplicates. However, if you know you might only get duplicates within 3 months you can limit the scan on the table to the last 3 months so you don't scan years worth of data, that way you speed up the incremental process dramatically.

@luislema79 luislema79 changed the title Added incremental predicates Added incremental predicates to Snowflakes satellites Jun 4, 2023
@luislema79 luislema79 changed the title Added incremental predicates to Snowflakes satellites Added incremental predicates to Snowflakes tables Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant