From the course: Snowflake SnowPro Core Cert Prep
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Secure views - Snowflake Tutorial
From the course: Snowflake SnowPro Core Cert Prep
Secure views
Secure views: So these are special kind of view to use in those situations where you don't want to expose the underlying view definition to end users. And for security reasons, you may want to prevent unauthorized access to the underlying tables or business logic that makes up the view definition. So when you create a view in Snowflake, by default, that creates a standard non-secure view as we touched upon in the first domain. But adding the keyword 'SECURE' to the create view statement makes the view you've created secure. So create secure view and then the view definition after that. So you might ask yourself the question, why not use secure views all of the time? Well, the reason is that the query optimizer bypasses some optimizations. It can apply to standard non-secure views for secure views. So the result here is a performance tradeoff. Secure views do not perform as well as non-secure views, so Snowflake's recommendation is to use them where you need to restrict access to the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.