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

ADAP-1051 - Temp Table Drop Fix #1076

Merged
merged 25 commits into from
Jul 22, 2024
Merged

ADAP-1051 - Temp Table Drop Fix #1076

merged 25 commits into from
Jul 22, 2024

Conversation

vinit2107
Copy link
Contributor

@vinit2107 vinit2107 commented Jan 20, 2024

resolves #1036
resolves #1051

Problem

Temp tables created by DBT in BigQuery in incremental strategy were not dropped after successful execution.

Solution

I have added handling for two scenarios:

  1. Drop the temp table after creation
  2. Ability to provide which dataset the temp table will be materialized + drop after execution

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)

@vinit2107 vinit2107 requested a review from a team as a code owner January 20, 2024 23:35
Copy link

cla-bot bot commented Jan 20, 2024

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @vinit2107

@vinit2107
Copy link
Contributor Author

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @vinit2107

I have signed the CLA. Please let me know if I need to do anything else.

@cla-bot cla-bot bot added the cla:yes label Jan 21, 2024
Copy link
Contributor

@dbeatty10 dbeatty10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good so far @vinit2107 !

I made two code suggestions to address and then we can queue it up for review by an engineer.

dbt/include/bigquery/macros/adapters/adapters.sql Outdated Show resolved Hide resolved
.changes/unreleased/Fixes-20240120-180818.yaml Outdated Show resolved Hide resolved
@vinit2107
Copy link
Contributor Author

Thanks @dbeatty10 for your input 👍🏻 I have made the recommended changes.

@dbeatty10 dbeatty10 added the ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering label Jan 29, 2024
@VersusFacit VersusFacit self-assigned this Jul 21, 2024
@VersusFacit
Copy link
Contributor

Hey @vinit2107 , thank you so much for this contribution. We had some time to assess this one and I think it looks great. I'm really happy we have this fix as opposed to one that just adds another flag on top of the already existing hours_to_expiration flag. This is all around great news. Thanks to you and Doug for getting this one in a well tested place.

I'll have this merged on Monday :)

@VersusFacit VersusFacit merged commit b9018f7 into dbt-labs:main Jul 22, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes ok to test ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering support test all
Projects
None yet
5 participants