SnowPro Associate: Platform Question 147
Single answer● Use database objectsA data engineering team stores raw sales files in an internal stage and loads them into a table named SALES_RAW. Analysts repeatedly run the same transformation logic to cast columns, filter out test records, and standardize dates before querying the data. The team wants to simplify analyst queries without duplicating data or reloading the table. Which Snowflake database object should be created to best meet this requirement?
- A
A view on top of SALES_RAW that contains the transformation query
- B
A new schema that stores transformed copies of the SALES_RAW table
- C
A file format object to apply transformations when analysts query the table
- D
A stage that points to the transformed result set for analyst access
Show answer and explanation
Correct answer: A
Explanation
The best answer is to create a view. In Snowflake, a view is a database object that stores the text of a query and can be used to present transformed, filtered, or simplified access to underlying tables without duplicating the table data. This matches the scenario requirement to avoid reloading or copying SALES_RAW while making analyst access easier. By contrast, stages are for file storage locations, and file formats describe how files should be parsed. Creating additional transformed tables would work functionally, but it would duplicate data and add maintenance overhead, which is not aligned with the requirement. This aligns with Snowflake documentation and best practices for using views to provide logical abstraction over base tables.
- A. Correct.
Correct. A view is a database object that stores a query definition and presents the transformed result set without copying the underlying table data. This is the best fit when analysts need a simplified, reusable query layer over existing data. Standard views are commonly used to encapsulate joins, filters, casts, and derived columns while keeping a single source of truth in the base table.
- B. Incorrect.
Incorrect. Creating a new schema does not itself provide a reusable query layer, and storing transformed copies of the table would duplicate data, which the scenario explicitly wants to avoid. While a separate table could be created in another schema, that would require additional storage and maintenance.
- C. Incorrect.
Incorrect. A file format object defines how staged data files are interpreted during loading or unloading, such as delimiters, compression, or date formats in files. It does not apply SQL transformations for users querying an existing table.
- D. Incorrect.
Incorrect. A stage is used to reference files for loading or unloading data. It does not store a query definition or expose a transformed relational result set for direct analyst querying in the way a view does.