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

Use tmp table in static insert overwrite #821

Closed
wants to merge 11 commits into from

Conversation

dbeatty10
Copy link
Contributor

Branched from #630 in order to align with the base branch and test. Content below copy-pasted from #630.


Resolves #427
Resolves #556

Description

As described in #427, static insert overwrite, when involving on_schema_change != 'ignore' would create a temp table to check for a schema change anyway.
It fixes as well:

  • In case, on_schema_change = 'ignore' with dynamic insert overwrite where the SQL header would not be added
  • In case, we would have static insert overwrite with on_schema_change != 'ignore' where the temp table would not be deleted

Checklist

@cla-bot cla-bot bot added the cla:yes label Jul 12, 2023
Comment on lines 87 to 90
{%- if tmp_relation_exists -%}
-- 2. clean up the temp table
drop table if exists {{ tmp_relation }}
{%- endif -%}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolves #556

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Everything else above resolves #427

@dbeatty10 dbeatty10 marked this pull request as ready for review July 12, 2023 20:57
@dbeatty10 dbeatty10 requested a review from a team as a code owner July 12, 2023 20:57
@dbeatty10
Copy link
Contributor Author

Closing since #630 was the original with priority anyways.

@dbeatty10 dbeatty10 closed this Jul 17, 2023
@mikealfare mikealfare deleted the dbeatty/630-tmp-table-insert-overwrite branch August 2, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants