Skip to content

update_view_via_alter checks for ownership #1654

Closed

Description

@karasda

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:

  1. 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)
  2. 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.

Activity

  1. sd-db commented on Aug 31, 2026

    @sd-db
    Collaborator

    I don't think we have instances in the code where we change the SQL based on access and would like to keep this simple (and not extra logic on this).

  2. karasda commented on Aug 31, 2026

    @karasda
    Author

    Perhaps it would be beter if Databricks changed this limitation then...
    I will ask our Databricks'es solution architect or something.

  3. sd-db commented on Oct 16, 2026

    @sd-db
    Collaborator

    Hi @karasda I am looking to close this issue (will close by Oct 19th), since this is outside of the adapter domain and not something we are looking to support. Let me know if you would want to keep this open.

  4. sd-db commented on Oct 19, 2026

    @sd-db
    Collaborator

    Closing as per above ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions