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 client.delete_dataset on BigQuery to drop datasets #1887

Closed
drewbanin opened this issue Nov 4, 2019 · 0 comments · Fixed by #1881
Closed

Use client.delete_dataset on BigQuery to drop datasets #1887

drewbanin opened this issue Nov 4, 2019 · 0 comments · Fixed by #1881
Labels
bigquery enhancement New feature or request

Comments

@drewbanin
Copy link
Contributor

Describe the feature

dbt should use the client.delete_dataset method to atomically drop BigQuery datasets:

client.delete_dataset(dataset_id, delete_contents=True, not_found_ok=True)

This is an improvement over the existing implementation which first deletes all of the tables in the dataset, then deletes the empty dataset. Some users have reported dbt failing to delete some of the tables in a dataset (and not removing the dataset itself), and I suspect that this change will fix that issue. At the very least, the client.delete_dataset implementation is simpler than the existing implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant