Question 61
You are developing a Snowpark application that processes large volumes of JSON data from an external stage. Initial testing on a MEDIUM warehouse results in significant query queuing. You suspect the issue is CPU bound due to complex JSON parsing and UDF execution within Snowpark. Considering only warehouse sizing options and assuming cost is a secondary concern to performance during peak processing hours, which strategy is MOST effective for optimizing performance? Consider the impact on concurrency.
Question 62
You are building a Snowpark Python application to perform complex data transformations and want to leverage external packages not pre-installed in the Snowflake environment. You need to ensure these packages are available within your Snowpark session. Which of the following methods are valid for deploying and using these third-party packages within your Snowpark Python environment? (Select TWO)
Question 63
You have a Snowpark DataFrame containing semi-structured data in a column named 'payload'. The 'payload' column contains JSON objects, and some of these objects contain nested arrays. You need to flatten all arrays, regardless of their level of nesting, and extract specific fields from the flattened data'. What is the MOST efficient approach using Snowpark to achieve this while minimizing the amount of code?
Question 64
You have developed a Snowpark Python stored procedure that calculates the average sales per region from a large sales data table. The procedure is currently defined inline within your Snowflake notebook. You want to operationalize this by creating the stored procedure from a local Python file named The file contains the following code: "'python from snowflake.snowpark.session import Session def calculate_avg_sales(session: Session, sales_table_name: str, region_column: str, sales_column: str) -> float: sales df = session.table(sales table name) avg_sales df = sales_df.group_by(region_column).agg({sales_column: 'avg'}) avg_sales = avg_sales_df.collect() return avg_sales[0][1] Which of the following code snippets correctly creates the stored procedure 'AVG SALES PROC in Snowflake, referencing the Python file, and handles potential dependency issues? Assume you have already established a Snowpark session named 'session' and that the stage 'my_stage' already exists.
Question 65
You have a Snowpark DataFrame containing product information, and you want to persist it into a Snowflake table named PRODUCTS. You need to handle the following scenarios: 1. If the table 'PRODUCTS does not exist, create it. 2. If the table PRODUCTS' exists, append the data from 'df_products' to it. Which of the following methods can achieve this?
