Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Microbatch] Leverage static partitioning in dbt-bigquery materialization strategy #802

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

borjavb
Copy link
Contributor

@borjavb borjavb commented Feb 7, 2025

resolves #538
docs dbt-labs/docs.getdbt.com/#

Problem

By using static partitions we are avoiding the extra steps of having to create tmp tables and then merging. Instead we use just one MERGE step.

Solution

Went through the jinja route to create the interval of partitions. Another option could have been using the generate the list of dates through GENERATE_TIMESTAMP_ARRAY (for 'hour' batch_size) or GENERATE_DATE_ARRAY (for all others)

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@borjavb borjavb requested a review from a team as a code owner February 7, 2025 09:06
@cla-bot cla-bot bot added the cla:yes The PR author has signed the CLA label Feb 7, 2025
@cla-bot cla-bot bot temporarily deployed to dbt-bigquery February 7, 2025 09:06 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes The PR author has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Microbatch] Leverage static partitioning in dbt-bigquery materialization strategy
1 participant