Checking for column-level security
Amelia from the Idaho field office is reporting that she can't see some data she was expecting in the site's table right before she left without any more detail. You remember that perhaps she can't see some columns and decides to check for any column-level security that might be applied to the table via the system column privileges view, SVV_COLUMN_PRIVILEGES
.
This exercise is part of the course
Introduction to Redshift
Exercise instructions
- Select the
relation_name
astable_name
,column_name
,privilege_type
asquery_type
, andidentity_name
asuser_or_role
from the system column privileges view. - Filter it down to just the
idaho_site_id
table.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
-- Select the relation_name as table_name
SELECT relation_name AS ___,
column_name,
-- Select the column that targets the privilege
___ AS query_type,
-- Select the identity as user_or_role
___ AS user_or_role
-- From the system column privileges view
FROM ___
-- The table name is idaho_site_id
WHERE ___ = 'idaho_site_id';