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-1661] Quotes usernames with special characters #265

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qmg-karan
Copy link

@qmg-karan qmg-karan commented Jul 19, 2024

resolves #156

Problem

This PR solves the issues where dbt tries to apply grant-related SQL queries against users that have special characters in their names and fails.

Solution

Quotes are added around users that hold special characters. So far, this just includes a few special characters that people have raised issues for across several dbt repos ("." in #156, "-" in #55, and "@" in my case.

Please suggest how this can be tested, I'm not entirely sure about this because the unit-tests seem to pass after I've made this change. Not sure where the tests should be added for this.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development, and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX

@qmg-karan qmg-karan requested a review from a team as a code owner July 19, 2024 10:53
Copy link

cla-bot bot commented Jul 19, 2024

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @qmg-karan

Copy link

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@qmg-karan qmg-karan force-pushed the CT-1661/quote-username-special-chars branch from 08211b7 to 22f399b Compare July 19, 2024 14:59
Copy link

cla-bot bot commented Jul 19, 2024

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @qmg-karan

@qmg-karan
Copy link
Author

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @qmg-karan

Signed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CT-1661] [Bug] Grants fails to correctly quote username when revoking
1 participant