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

Insufficent permission to catalog='system' when using dbt-databricks=1.8.7 #838

Open
VippsMe opened this issue Oct 28, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@VippsMe
Copy link

VippsMe commented Oct 28, 2024

Describe the bug

Issue when using dbt-databricks==1.8.7

  • We just upgraded from dbt-databricks 1.5 to 1.8.7. This upgrade resulted in an error in the ci job. Downgraded to vs 1.7.17 and then it worked again.
  • Error message in github action ci job:

[INSUFFICIENT_PERMISSIONS] Insufficient privileges:
User does not have USE CATALOG on Catalog 'system'. SQLSTATE: 42501

Steps To Reproduce

See above. Run dbt compile and it will give you the error message. Target is set to a different catalog in databricks with permissions for the user. Somehow, the dbt-databricks adapter is trying to access catalog 'system'. This catalog is not part of our internal code at all.

Expected behavior

See above.

Screenshots and log output

image

System information

The output of dbt --version:

<output goes here>

The operating system you're using:

The output of python --version:3.10.12

Additional context

Add any other context about the problem here.

@VippsMe VippsMe added the bug Something isn't working label Oct 28, 2024
@benc-db
Copy link
Collaborator

benc-db commented Oct 29, 2024

This looks like your admin has removed your permission to the system catalog, as every user should have access to this table by default. We can investigate a flag to allow you to reference UC information_schemas scoped by catalog, but we moved to using system catalog as the catalog-scoped information_schema views break if you rename a catalog, so it's kind of a no win situation.

@d474b3r9
Copy link

d474b3r9 commented Nov 6, 2024

Hello, I encounter the exact same issue even if in my profiles.yml.
It works in 1.7.17 but not in 1.8.7 and >

I work on a managed databricks workspace and my company will not allow me rights on the system_catalog.

Do you have a workaround ?
Something like set use_system_catalog: false should be great ! ;)

@VippsMe
Copy link
Author

VippsMe commented Nov 13, 2024

a

Its not because of our admin. Access to catalog 'system' has been the exact same all the time.
So it is something about dbt-databricks adapter 1.8.XX that is trying to access catalog 'system' (and not our internal repo/code)

@benc-db
Copy link
Collaborator

benc-db commented Nov 13, 2024

@VippsMe yes, we changed to using system, but we changed because a.) it is more reliable than the individual catalog info_schemas because they are just views of system that can break if the catalog is renamed, and b.) everyone has access to system.information_schema by default. So the reason I'm suggesting that your admin at some point removed your permission, is because you should have access, and if you don't, it's something that an admin can change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants