SnowPro Advanced: Architect — Question 154

An Architect is working with a healthcare company’s Enterprise data governance team to review how company-sensitive data is protected within Snowflake. Physicians in the company network can run queries against views. There are two views, one shows mental health information, and the other shows physical health information:

create view mental_health_view as select * from patients where category = 'MentalHealth';

create view physical_health_view as select * from patients where category = 'PhysicalHealth';

Most physicians do not have direct access to the table. Instead, they are assigned one of two roles:

1. MentalHealth, which has privileges to read from mental_health_view. or
2. PhysicalHealth, which has privileges to read from physical_health_view.

A physician with the PhysicalHealth role wants to know whether there are any mental health patients in the table, and used the following query:

select * from physical_health_view where 1/iff(category = 'MentalHealth', 0, 1) = 1;

How will this query affect the sensitive data?

Answer options

Correct answer: D

Explanation

The correct answer is D because the query is structured in a way that does not provide access to the mental health data while also allowing the physician to infer its existence. Options A, B, and C are incorrect as they suggest potential access to sensitive information that is not available to the physician with only the PhysicalHealth role.