CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Introduction to Redshift

Afficher le cours

Instructions

  • Select the relation_name as table_name, column_name, privilege_type as query_type, and identity_name as user_or_role from the system column privileges view.
  • Filter it down to just the idaho_site_id table.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de 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';
Modifier et exécuter le code