From the course: Intro to Snowflake for Devs, Data Scientists, Data Engineers

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Views: Part 2

Views: Part 2

- Earlier, we covered creating a standard view, dropping a view, showing views, and describing views. Here we're going to learn about materialized views, and the good news is that all of those same commands we just learned, also work with materialized views. I don't want to belabor that point, but let's just run through it really quickly. (screen whooshes) If we create a materialized view, it's the same syntax as creating a normal view, but with the word MATERIALIZED added after CREATE. Here, let's create a materialized view called brand_names_materialized. CREATE MATERIALIZED VIEW frostbyte_tasty_bytes, harmonized brand_names_materialized AS SELECT DISTINCT truck_brand_name FROM frostbyte_tasty_bytes.raw_pos menu. Then we can check to see that it worked, by running a query on that materialized view. SELECT * FROM frostbyte_tasty_bytes.harmonized .brand_names_materialized. And we can run SHOW VIEWS to make sure it's listed. Note that it's got a True under the column, is_materialized…

Contents