redshift error when grant select on table: Operation not supported on external tables

0

I have a redshift table that I would like to grant access to a user, if I run: GRANT SELECT ON ALL TABLES IN SCHEMA schema_name to user_name; it works,

however, if I run: GRANT SELECT ON schema_name.table_name to user_name; I got the following error: ERROR: Operation not supported on external tables

Any ideas why? Thanks!

질문됨 일 년 전1490회 조회
1개 답변
0
수락된 답변

You are seeing this error since SELECT is not a supported privilege type for external schema. Supported privilege are CREATE, ALTER, DROP. Refer following doc for details. https://docs.aws.amazon.com/redshift/latest/dg/r_GRANT.html

GRANT { { CREATE | ALTER | DROP }  [, ...] | ALL [ PRIVILEGES ] }
    ON EXTERNAL SCHEMA schema_name [, ...]
    TO { IAM_ROLE iam_role } [, ...] [ WITH GRANT OPTION ]   

If you want to grant SELECT privilege for tables in an external schema, use the following syntax.

GRANT { { SELECT | ALTER | DROP | DELETE | INSERT }  [, ...] | ALL [ PRIVILEGES ] }
    ON EXTERNAL TABLE schema_name.table_name [, ...]
    TO { { IAM_ROLE iam_role } [, ...] | PUBLIC } [ WITH GRANT OPTION ]
AWS
Yota_H
답변함 일 년 전
profile picture
전문가
검토됨 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인