Question 121
A Snowpark application processes streaming data from Kafka, performing complex windowing aggregations. The application is configured with auto-scaling enabled for the virtual warehouse. During peak hours, the application exhibits high latency despite the warehouse scaling up. Upon investigation, you observe sustained high CPU utilization on the single active warehouse. Which actions, alone or in combination, would MOST effectively improve performance while minimizing cost?
Question 122
You are developing a Snowpark application that needs to access data from a Snowflake table called 'EMPLOYEES. You want to create a Snowpark DataFrame representing this table. However, you are facing issues with the connection and believe that the database, schema, or warehouse attributes may not be set up correctly for the session. Which of the following code snippets, used in conjunction, BEST demonstrates how to create a Snowpark session with robust error handling to identify and address potential connection issues before attempting to create the DataFrame?
Question 123
You are building a Snowpark application that uses a Python UDF to perform sentiment analysis on customer reviews. The UDF relies on a large pre-trained machine learning model loaded from a file. During execution, you encounter 'Out of Memory' errors within the UDF. Considering the constraints of the Snowpark execution environment and the need to optimize resource usage, which of the following steps is the MOST effective in addressing this issue and ensuring the application's stability and performance?
Question 124
You are tasked with automating the creation of Snowpark sessions using key pair authentication for multiple users. You have a function that retrieves connection parameters (account, user, private key, etc.) for each user from a secure configuration file. The private keys are stored in PEM format. However, some users' private keys are password-protected. Which of the following approaches ensures the secure and correct establishment of Snowpark sessions for all users, including those with password-protected private keys? Assume get_user config(username)' retrieves the user's configuration, including the private key and password (if any).
Question 125
You have a Snowpark Python application that uses a UDF to perform custom data transformations. The UDF relies on a large, read-only lookup table that is stored as a CSV file on a Snowflake stage. Which of the following strategies would be the MOST efficient way to access the lookup table within the UDF?
