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

[CT-3081] [Bug] Improve Error Messages for Grants #8564

Closed
2 tasks done
callum-mcdata opened this issue Sep 6, 2023 · 1 comment
Closed
2 tasks done

[CT-3081] [Bug] Improve Error Messages for Grants #8564

callum-mcdata opened this issue Sep 6, 2023 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@callum-mcdata
Copy link
Contributor

callum-mcdata commented Sep 6, 2023

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Right now, grants display as a database error for the model being run. This makes it very difficult to debug if you are unaware of the full grant logic!

14:09:27  Database Error in model model_name (models/folder/folder/folder/model_name.sql)
14:09:27    user "analyst" does not exist

This may be running in a single transaction but it would be amazing if we could have the error message display that it was from a grant.

Expected Behavior

I would love if we could have something more like this:

14:09:27  Database Error in model model_name (models/folder/folder/folder/model_name.sql)
14:09:27   GRANT: user "analyst" does not exist

Just a simple designation that the error message is stemming from the grant statement.

Steps To Reproduce

In redshift create a group called analyst but not a user called analyst. Run any dbt model with the following configuration.

models:
  +grants:
    select: ["analyst"]

The correct config should be:

models:
  +grants:
    select: ["group analyst"]

Relevant log output

No response

Environment

- OS:MacOS
- Python: 3.11
- dbt: 1.6.1

Which database adapter are you using with dbt?

redshift

Additional Context

Hi 👋 . Not super high priority but just a little bit of pain that took me a few hours to figure out what was going on. Figured I'd flag to y'all

@callum-mcdata callum-mcdata added bug Something isn't working triage labels Sep 6, 2023
@github-actions github-actions bot changed the title [Bug] Improve Error Messages for Grants [CT-3081] [Bug] Improve Error Messages for Grants Sep 6, 2023
@dbeatty10
Copy link
Contributor

It looks like GitHub duplicated #8563 twice, so I'm going to close this one as a duplicate.

@dbeatty10 dbeatty10 added duplicate This issue or pull request already exists and removed triage labels Sep 6, 2023
@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants