Question 11
You are developing a Snowpark Python stored procedure that needs to interact with an external REST API. The API requires authentication using an API key, which you want to store securely and access within the stored procedure. What is the MOST secure and recommended way to store and retrieve the API key within the stored procedure?
Question 12
You are developing a data pipeline using Snowpark and want to optimize the execution of multiple DataFrame transformations. Which of the following strategies or techniques can you employ to improve performance and reduce execution time? (Select all that apply)
Question 13
You have a Snowpark DataFrame named containing daily sales transactions. The DataFrame includes columns like 'transaction_id' , 'product id', 'sale_date', and 'sale_amount'. You need to perform the following transformations and persist the results: (1) Calculate the total sales amount for each product on a daily basis. (2) Store the aggregated results into a new table named , partitioned by 'sale_date'. (3) Ensure that if the table already exists, the new data is appended to the existing table. Which of the following code blocks achieve these requirements in the most efficient and correct manner?
Question 14
You are working with a Snowpark DataFrame containing employee data, including columns 'employee_id', 'first_name', 'last_name', 'salary', and 'department'. You need to perform the following transformations: 1. Concatenate 'first_name' and into a new column called separating them with a space. 2. Increase each employee's salary by a percentage based on their 'department'. Department 'Sales' gets a 10% raise, 'Marketing' gets a 15% raise, and all other departments get a 5% raise. 3. Create a new column reflecting this raise. Which of the following Snowpark code snippets achieves these transformations correctly and efficiently? (Select all that apply)
Question 15
You have created a Snowpark UDF that uses a custom Python module 'my_module.py', containing a function 'process data'. This module is not available through Anaconda'. You've packaged the module into a zip file named 'my module.zip'. What steps are necessary to deploy this UDF in Snowflake so that it can correctly use the 'my_module'?
