Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Introduction to Redshift

Cursus bekijken

Oefeninstructies

  • 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.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

-- 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';
Code bewerken en uitvoeren