Skip to content

Fix/clean global temporary table #13

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

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

aosingh
Copy link
Member

@aosingh aosingh commented Jun 2, 2022

  • dbt functionalities Incremental materialization and Snapshots use temporary tables to stage new data (delta). The data from the temp table is either merged or inserted into the target table.
  • These temp tables are bound to the session and are automatically truncated after the session exits, however they were never dropped.
  • This fix first truncates the temporary table and then drops it.
  • There is an additional check added in oracle__truncate_relation macro to avoid ORA-01702: a view is not appropriate here

aosingh added 2 commits June 2, 2022 13:43
- Both Incremental materialization and Snapshots use temporary tables to stage new data. The data from the temp table is either merged or inserted into the target table. These temp tables are automatically truncated after the session exits, however they were never dropped.
- This fix first truncates the temporary table and then drops it.
@ramapemmaraju ramapemmaraju self-requested a review June 2, 2022 23:08
Copy link

@ramapemmaraju ramapemmaraju left a comment

Choose a reason for hiding this comment

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

looks good

@aosingh aosingh merged commit bd03171 into release/v1.0.3 Jun 3, 2022
@aosingh aosingh deleted the fix/clean_global_temporary_table branch June 3, 2022 18:33
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.

2 participants