SnowPro Associate: Platform Question 65
Single answer● Notebook sessionsA data analyst is using a Snowflake Notebook to explore a large sales dataset with Python. The analyst runs several cells successfully, steps away for a while, and then returns to find that the notebook is no longer connected to an active session. They want to continue working without unexpectedly losing progress again and also want to control compute usage. Which action is the BEST choice?
- A
Restart the notebook session when needed and save important work to notebook cells or Snowflake objects, because notebook sessions are temporary compute-backed environments that can end when inactive
- B
Convert the notebook into a permanent virtual warehouse so the Python state is preserved until the analyst manually deletes it
- C
Grant the analyst the ACCOUNTADMIN role so notebook sessions remain active across idle periods
- D
Move the notebook to a database schema with managed access so the session automatically resumes with all in-memory variables intact
Show answer and explanation
Correct answer: A
Explanation
This question tests practical understanding of Snowflake Notebook sessions as temporary, compute-backed environments rather than permanent runtime containers. In real use, a notebook session may need to be restarted after inactivity or when compute is stopped. Candidates should know that notebook code and persisted outputs should be saved explicitly, while important intermediate or final results should be written to Snowflake-managed storage such as tables, stages, or other durable objects when needed. This aligns with Snowflake best practices: treat session state as ephemeral, use least privilege, and manage compute intentionally to control cost. Documentation for Snowflake Notebooks and general Snowflake operational guidance emphasizes the distinction between persisted Snowflake objects and temporary session/runtime state.
- A. Correct.
Correct. Snowflake Notebook sessions are temporary execution environments backed by compute. If a session ends due to inactivity or being stopped, in-memory state such as Python variables is not something you should rely on preserving indefinitely. The practical best practice is to save work in notebook cells, persist results to Snowflake tables/stages as needed, and restart the session when necessary. This addresses both reliability and compute control.
- B. Incorrect.
Incorrect. A notebook is not converted into a virtual warehouse, and a warehouse does not exist to preserve notebook kernel state indefinitely. Warehouses provide compute resources for SQL workloads, but notebook session state is separate and temporary. This option reflects a common misconception that warehouse persistence equals notebook kernel persistence.
- C. Incorrect.
Incorrect. Roles such as ACCOUNTADMIN control privileges, not idle timeout behavior for notebook sessions. Granting elevated privileges would not keep the session alive and would violate least-privilege best practices. Session lifecycle and compute behavior are not solved by broad administrative access.
- D. Incorrect.
Incorrect. Managed access schemas affect object privilege management within the schema, not notebook session lifecycle or restoration of in-memory Python variables. Placing the notebook in a different schema does not make notebook sessions persistent or automatically recover runtime state.