SnowPro Associate: Platform Question 269
Single answer● Preview the table dataA data engineer has just loaded a new CSV file into the table SALES_RAW and wants to quickly inspect a few rows to confirm that the values landed in the correct columns before continuing with downstream transformations. Which SQL statement is the most appropriate way to preview the table data in Snowflake?
- A
SELECT * FROM SALES_RAW LIMIT 10;
- B
SHOW TABLES LIKE 'SALES_RAW';
- C
DESCRIBE TABLE SALES_RAW;
- D
LIST @SALES_RAW;
Show answer and explanation
Correct answer: A
Explanation
To preview table data in Snowflake, the correct approach is to query the table directly, typically with a SELECT statement and a LIMIT clause to avoid returning an unnecessarily large result set. This is a practical best practice when validating a recent load. In contrast, SHOW and DESCRIBE commands expose metadata, not table contents, and LIST is intended for staged files rather than database tables. Snowflake documentation distinguishes clearly between querying relational objects with SELECT and inspecting metadata or stage contents with SHOW, DESCRIBE, and LIST.
- A. Correct.
Correct. Running a SELECT statement with LIMIT is the standard way to preview a small sample of table data in Snowflake. It returns actual row values from the table while restricting the result set to a manageable number of rows for quick inspection.
- B. Incorrect.
Incorrect. SHOW TABLES returns metadata about tables, such as table names and properties, but it does not display the row data stored in SALES_RAW. Someone might choose this option because they want to verify the table exists, but it does not preview the contents.
- C. Incorrect.
Incorrect. DESCRIBE TABLE shows the table's column definitions, data types, and schema metadata. It is useful for checking structure, but not for examining the actual loaded records. This is a common confusion between schema inspection and data preview.
- D. Incorrect.
Incorrect. LIST is used to view files in an internal or external stage, not rows in a database table. SALES_RAW is a table name in this scenario, not a stage reference. This distractor reflects confusion between staged files and loaded table data.