SnowPro Associate: Platform Question 271
Single answer● Preview the table dataA data engineer has just loaded a new CSV file into the table SALES_STAGING and wants to quickly verify that the rows look correct before starting any transformations. The engineer does not need all rows returned and wants the fastest, simplest SQL statement to preview a small sample of the table data. Which statement should the engineer use?
- A
SELECT * FROM SALES_STAGING LIMIT 10;
- B
DESCRIBE TABLE SALES_STAGING;
- C
SHOW TABLES LIKE 'SALES_STAGING';
- D
SELECT COUNT(*) FROM SALES_STAGING;
Show answer and explanation
Correct answer: A
Explanation
To preview table data in Snowflake, the practical approach is to run a SELECT query and limit the number of returned rows, for example with LIMIT. This allows a user to inspect actual loaded values without scanning the entire result set for display purposes. Commands such as DESCRIBE TABLE and SHOW TABLES provide metadata, not data preview. COUNT(*) is useful for row-count validation but does not help verify whether the contents of individual rows were loaded correctly. This aligns with standard Snowflake SQL usage and common best practices for validating staged or newly loaded data.
- A. Correct.
Correct.
SELECT * FROM SALES_STAGING LIMIT 10;returns a small subset of rows from the table, which is the standard way to preview table data in Snowflake using SQL. AddingLIMITavoids returning the full dataset and is appropriate when the goal is just to inspect sample records after loading. - B. Incorrect.
Incorrect.
DESCRIBE TABLEshows the table's metadata, such as column names, data types, and nullability, but it does not display actual row values. A user might choose this if they confuse schema inspection with data preview. - C. Incorrect.
Incorrect.
SHOW TABLESreturns metadata about tables, such as table names and ownership details. It helps confirm that the table exists, but it does not preview the contents of the table. - D. Incorrect.
Incorrect.
SELECT COUNT(*)returns the number of rows in the table, which can help validate load volume, but it does not show any sample data. Someone might choose this if they are focused on load validation rather than row-level inspection.