SnowPro Associate: Platform Question 71
Single answer● Run codeA data engineer needs to execute a one-time data fix directly in Snowflake by updating rows in a table based on a lookup table. The engineer opens Snowsight and wants to run the SQL safely and efficiently, then verify how many rows were affected. Which action should the engineer take?
- A
Run an UPDATE statement in a SQL worksheet, then check the query results and query history for the number of rows updated.
- B
Create a task because all DML statements in Snowflake must be executed through scheduled objects.
- C
Use the Load Data wizard because it is designed to modify existing table rows in place.
- D
Run the SQL from the Data » Databases object explorer only, because worksheets cannot execute UPDATE statements.
Show answer and explanation
Correct answer: A
Explanation
For the SnowPro Associate exam, candidates should understand that 'run code' in Snowflake commonly means executing SQL statements in a worksheet in Snowsight or another supported SQL client. For a one-time data correction, an UPDATE statement in a worksheet is the practical and expected approach. Snowflake records execution details in query history, which can be used to validate the statement and review rows affected. Best practice is to use the appropriate role, confirm the target warehouse and database/schema context, and validate the impact after execution. This aligns with Snowflake documentation on using worksheets in Snowsight and reviewing query history for executed SQL.
- A. Correct.
Correct. In Snowsight, a SQL worksheet is the standard place to run ad hoc SQL, including DML such as UPDATE statements. After execution, Snowflake returns statement results and metadata, and the query can also be reviewed in query history to confirm execution details such as rows affected. This is the appropriate way to run a one-time data fix.
- B. Incorrect.
Incorrect. Tasks are used to schedule SQL or procedural logic to run automatically on a defined schedule or after another task. They are not required for one-time manual execution of DML. A candidate might choose this if they confuse code execution with orchestration.
- C. Incorrect.
Incorrect. The Load Data workflow is intended for ingesting data into Snowflake tables, typically from staged files. It is not the tool for performing in-place row updates using SQL logic. This distractor targets the misconception that any data change operation should use a loading interface.
- D. Incorrect.
Incorrect. Snowsight worksheets are specifically designed to run SQL statements, including SELECT, INSERT, UPDATE, DELETE, and DDL commands, assuming the user has the necessary privileges and a warehouse is available when required. The object explorer helps navigate objects but is not the only place from which code can be executed.