QuestionQ98

Secure Data Sharing and Consumption

A company has two databases with the following access design:

DB1 has SCH1, which contains these four objects:

  1. Table_A
  2. Table_B
  3. View_A
  4. Database role DB1.SCH1.DB_R_Role

Database role DB1.SCH1.DB_R_Role has SELECT privileges on Table_A, Table_B, and View_A in SCH1.

DB2 has SCH1, which contains these objects:

  1. Table_A
  2. Database role DB2.SCH2.DB_RW_Role

Database role DB2.SCH2.DB_RW_Role has SELECT, INSERT, CREATE, UPDATE, and FUTURE GRANTS on TABLE_A, TABLE_B, and VIEW_A in SCH1.

A Data Engineer assigned User_A must create View_A in DB2.SCH1 by joining DB1.SCH1 Table_A with DB2.SCH1 Table_A.

What permissions must be assigned to User_A?

Explanation

Creating the view requires the target-schema creation privileges and access to DB2.SCH1.Table_A, as well as SELECT on DB1.SCH1.Table_A. DB2.SCH1.DB_RW_Role provides the DB2 permissions, and DB1.SCH1.DB_R_Role provides the DB1 read permissions. Database roles must be granted to an account role that can be activated by the user; granting both database roles to the Data_engineer role provides the complete combined privilege set.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!