Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Conversation

@joshuao11
Copy link

@joshuao11 joshuao11 commented Nov 8, 2024

The insert overwrite does this, so let's copy that pattern here to keep the schemas/datasets tidy in BQ for the users

resolves ##1389

Problem

When using a merge strategy with the model checking the schema (To add or replace columns):
image

There is nothing to delete the temp table created:

image

Solution

We add in a step to delete and tidy up the temporary table, in the same way that is currently there for the insert_overwrite strategy:

image

I also checked that there was no impact on the 'ignore' strategy for on_schema_change:

There is no temporary table made here so we do not expect the DROP statement to appear:

image

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
    I ran tox -p and everything seems to pass
  • This PR includes tests, or tests are not required/relevant for this PR

This change does change a macro but i'm unsure how to get feedback for Product or DX

  • 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

The insert overwrite does this, so let's copy that pattern here to keep the schemas/datasets tidy in BQ for the users
@joshuao11 joshuao11 requested a review from a team as a code owner November 8, 2024 15:18
@cla-bot
Copy link

cla-bot bot commented Nov 8, 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: @joshuao11

@cla-bot cla-bot bot added the cla:yes label Nov 8, 2024
@github-actions
Copy link
Contributor

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant