SOL-C01 · Question #23
You have two tables, employees' and departments'. The employees' table contains employee information, including 'employee_id' and The departments' table contains department information, including and
The correct answer is A. Create a view using a standard 'JOIN' clause to combine the tables based on 'department_id'. C. Create a secure view using a standard 'JOIN' clause to combine the tables, hiding the base table. Options A and C are correct because Snowflake fully supports creating both standard views and secure views using JOIN clauses - a standard view (CREATE VIEW) and a secure view (CREATE SECURE VIEW) can both reference multiple tables via JOIN, making them valid approaches for combi
Question
You have two tables, employees' and departments'. The employees' table contains employee information, including 'employee_id' and The departments' table contains department information, including and department_name'. You want to create a view that combines data from both tables, showing employee name and their respective department name. Which of the following approaches are valid when creating this view using Snowflake?
Options
- ACreate a view using a standard 'JOIN' clause to combine the tables based on 'department_id'.
- BCreate a materialized view using a standard 'JOIN' clause, and ensure the view is automatically
- CCreate a secure view using a standard 'JOIN' clause to combine the tables, hiding the base table
- DCreate two separate views, one for 'employees' and one for 'departments', and then use a third
- ECreate a view using a 'LATERAL FLATTEN' function to join the tables based on 'department_id'.
How the community answered
(46 responses)- A78% (36)
- B9% (4)
- D2% (1)
- E11% (5)
Explanation
Options A and C are correct because Snowflake fully supports creating both standard views and secure views using JOIN clauses - a standard view (CREATE VIEW) and a secure view (CREATE SECURE VIEW) can both reference multiple tables via JOIN, making them valid approaches for combining employees and departments data.
Option B is wrong because Snowflake materialized views do not support JOIN clauses - they are restricted to single-table queries, so attempting to use a JOIN in a materialized view will fail.
Option D is wrong because while chaining views is technically possible, the question asks about combining data from both tables in a single view - creating three separate views adds unnecessary complexity and isn't the intended approach being tested.
Option E is wrong because LATERAL FLATTEN is designed to unnest semi-structured/array data (e.g., VARIANT columns), not to join relational tables on a foreign key like department_id.
Memory tip: In Snowflake, think "Standard and Secure views are JOIN-friendly; Materialized views are JOIN-free." If you see LATERAL FLATTEN, it means semi-structured data - not a relational join.
Topics
Community Discussion
No community discussion yet for this question.