Question 96
You have a Snowpark DataFrame named 'products_df' with columns 'product_id' (INT), 'product_name' (VARCHAR), and 'price' (FLOAT). You want to create a new DataFrame called 'discounted_products df that includes all columns from 'products_df' plus a new column named 'discounted_price', which is calculated as the original price minus a discount percentage specified by the variable 'discount_rate' (e.g., 0.1 for 10%). The 'discount_rate' is stored in the database table named 'discount_table'. You want to load the rate to variable. Choose the correct ways to achieve this. (Select all that apply)
Question 97
You are tasked with optimizing a Snowpark Python application that performs complex data transformations on a large dataset. The application's performance is currently bottlenecked by the data transfer between Snowflake and the client machine running the Python code. Which of the following strategies can effectively minimize data transfer and improve performance?
Question 98
You have a Snowpark Python application that reads data from a Snowflake table, performs several transformations, and then writes the results back to a new Snowflake table. The transformations involve complex calculations and aggregations. During testing, you observe that the application is consuming a significant amount of credits. Which of the following optimization strategies would be MOST effective in reducing the credit consumption of your Snowpark application?
Question 99
You are using Snowpark Python to build a data pipeline. You need to version control your Snowpark application and ensure that it is compatible with different Snowflake environments (development, staging, production). Which strategies and tools would be most effective for managing the Snowpark application's code, dependencies, and deployment process?
Question 100
You are tasked with building a machine learning pipeline in Snowpark to predict customer churn. You plan to use the scikit-learn library for model training and want to deploy the trained model as a Snowpark UDF for real-time scoring. Consider the following code snippet:
