Question 106

You are building a Snowpark application to process sensitive data'. To enhance security, you want to leverage ephemeral sessions. Which configurations, passed to 'snowpark.Session.builder.configS , are required and sufficient to create an ephemeral session? Assume your Snowflake environment is properly configured to allow ephemeral sessions.
  • Question 107

    You are working with a Snowpark DataFrame 'products df' containing product information, including 'product_id', 'price', and 'discount'. You need to update the 'price' column in the 'products' table based on the following logic: If 'discount' is greater than 0.2, reduce the 'price' by 15%. If 'discount' is between 0.1 and 0.2 (inclusive), reduce the 'price' by 5%. Otherwise, keep the 'price' as is. Which of the following Snowpark code snippets efficiently implements this update? Assume 'products' table already exists and is correctly populated.
  • Question 108

    You are developing a Snowpark application to perform complex data transformations on a large dataset stored in Snowflake. You need to optimize the application's performance. Which of the following strategies are MOST effective for improving performance within Snowpark?
  • Question 109

    You have a Snowpark Python application that performs several data transformations on a DataFrame representing customer transactions. The application is experiencing performance issues, and you suspect that some transformations are unnecessarily expensive. Which of the following techniques can MOST effectively optimize the performance of your Snowpark application, specifically focusing on minimizing data movement and leveraging Snowflake's query optimization capabilities?
  • Question 110

    You're working with Snowpark and have a DataFrame 'df containing a column 'json_data' with JSON strings. Some of these JSON strings are invalid. You need to parse the valid JSON strings and extract a field named 'product_id' from them. Invalid JSON strings should result in a 'NULL' value for the extracted 'product_id'. Which of the following approaches is the MOST robust and efficient way to achieve this?