Thursday, November 8, 2018

Amazon Redshift - How to fix query access error


Amazon Redshift - How to fix query access error



Once cluster has been created and setup, we will use either Query Editor of Amazon Redshift console, for running simple queries or use SQL Workbench to access database and query against them

sdx01 - is the Super user for Amazon redshift data warehouse and AWS recommends users to be created for development purposes 

If schema or tables are accessed just after creation, we will get error as GRANTS has not been provided yet. Ideally GRANTS based on requirement like only SELECT, or INSERT, UPDATE, DELETE has to be privileged before use 

Error:


Resolution: apply grants as required before accessing them in any query interface

GRANT ALL ON SCHEMA schema_name TO user_name;
or
GRANT SELECT ON ALL TABLES TO SCHEMA schema_name TO user_name;

applying above grants will execute the queries successfully

No comments:

Post a Comment