Describe the feature
In order to change the view via alter view as query you have to be owner of the table, which is more strict than create or replace as query. If your user/service principal is not owner it will fail (and stops the execution)
I would like dbt to have some fallback scenario (CVAS) in this case.
For us it is ok in production, where we have fixed service principal, but it is creating some troubles in dev as developers are reusing each others' objects. And if would want to change the prod service principal, all runs would start failing
Describe alternatives you've considered
Drop the view and recreate it if you do not have rights.
Additional context
I thought about these possibilities:
- somehow check the owner of view and compare with principal and in case of mismatch fallback to "CREATE or REPLACE" (and probably raise some warning)
- Try the usual ALTER VIEW as query and in case of raised error try fallback above.
Who will this benefit?
The developers during developement stage.
Are you interested in contributing this feature?
No.
Describe the feature
In order to change the view via
alter view as queryyou have to be owner of the table, which is more strict thancreate or replace as query. If your user/service principal is not owner it will fail (and stops the execution)I would like dbt to have some fallback scenario (CVAS) in this case.
For us it is ok in production, where we have fixed service principal, but it is creating some troubles in dev as developers are reusing each others' objects. And if would want to change the prod service principal, all runs would start failing
Describe alternatives you've considered
Drop the view and recreate it if you do not have rights.
Additional context
I thought about these possibilities:
Who will this benefit?
The developers during developement stage.
Are you interested in contributing this feature?
No.