Closed thomas-vl closed 10 months ago
@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 INFORMATION_SCHEMA.SCHEMATA
, especially if they don't have permission to create schemas. Is there a way to handle this without that access?
I would add that not all users necessarily have access to
INFORMATION_SCHEMA.SCHEMATA
, especially if they don't have permission to create schemas. Is there a way to handle this without that access?
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.
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