SQL command failing for tables having names from reserved keywords
Describe the bug
Permifrost fails to grant permissions on the tables having their names that matches to the reserved keywords in SnowFlake because permifrost lowercases the table name.
To successfully run SQL query on those tables, the table should be enclosed in double quotes and also the case-sensitivity should be maintained.
Steps To Reproduce
- Create a table that matches to reserved keywords. Let's create table named
ALLfor an instance. - Grant permission on that table for any user or role.
GRANT select ON table <database>.<schema>."ALL" TO ROLE transformer;
- In permifrost's spec file do not grant the permission to role
transformer, to make permifrost generate revoke command. - Run permifrost for the
transformerrole.
I guess, the problem will occur not only when revoking but also when you are granting permission.
Expected behavior
- Permifrost to generate SQL commands in case-sensitive for table name matching to SnowFlake's reserved keywords.
[SUCCESS] REVOKE select ON table raw.perf_poc_timebro."ALL" FROM ROLE transformer;
Screenshots and log output
[FAILED] REVOKE select ON table raw.perf_poc_timebro."all" FROM ROLE transformer;
The output of permifrost --version:
permifrost, version 0.13.0
The operating system you're using:
macOS Big Sur 11.6.1
The output of python --version:
Python 3.9.6
Additional context
Add any other context about the problem here.

