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

Add pre-model hook for cleaning up remote temporary table on MotherDuck #375

Merged

Conversation

guenp
Copy link
Collaborator

@guenp guenp commented Apr 12, 2024

When a dbt incremental model is run on MotherDuck, the otherwise temporary table is created as a regular table on the server in a dbt_temp schema, and the table is dropped afterwards (see #326). However, if something goes wrong with the dbt run, the table persists. This PR adds the drop_relation call to the pre-model hook such that the "temporary" table is dropped beforehand if it still exists.

@jwills jwills merged commit ae89071 into duckdb:master Apr 13, 2024
28 of 30 checks passed
@guenp guenp deleted the guenp/delete-temp-table-if-exists branch April 15, 2024 17:25
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.

None yet

2 participants