-
Notifications
You must be signed in to change notification settings - Fork 125
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
BigQuery check if schema already exists before trying to create it #220
Conversation
@thomas-vl : Do we have a test that covers this scenario: a schema exists and dbt does not try to create it again |
@dataders : could you merge this PR? I discussed testing this with @thomas-vl, however, we would need a user in the CI that has permissions to create tables and not schemas. This is the situation Thomas is facing, though less likely in a testing setup. The change can not be covered with a additional (unit) test. |
@dataders brought this up at our latest triage review, and it looks good to go! :) |
I would add that not all users necessarily have access to |
I think that everyone one in security will have no problem giving out read access to INFORMATION_SCHEMA in favour of not giving out create access for datasets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this as it's been in use in the field for quite some time.
…bt-labs#220) * fix check schema * fix when we do not need to update the schema --------- Co-authored-by: Thomas van Latum <tvanlatum@sligro.nl>
…bt-labs#220) * fix check schema * fix when we do not need to update the schema --------- Co-authored-by: Thomas van Latum <tvanlatum@sligro.nl>
Description & motivation
Before trying to create a new dataset we should check if it already exists without using the CREATE statement.
It could be that the DBT SA or DBT user that runs the command does not has the permission to create a dataset.
Checklist