Snowflake Certified SnowPro Specialty - Snowpark - SPS-C01무료 덤프문제 풀어보기
You are working with a Snowpark DataFrame 'df that contains user profile data'. A column named 'profile' stores user information as JSON, including 'age' (which can be a number or a string), 'is active' (which can be a boolean or a string 'true'/'false'), and registration date' (stored as a string in 'YYYY-MM-DD' format). You need to perform the following data transformations: 1. Cast the 'age' to an integer, defaulting to -1 if casting fails. 2. Cast 'is active' to a boolean, treating 'true' (case-insensitive) as true and any other string as false. 3. Convert 'registration_date' to a date object. Select the code snippets (multiple answers can be correct) that correctly accomplish these tasks using Snowpark DataFrame transformations.
정답: A,D
설명: (Fast2test 회원만 볼 수 있음)
A data scientist is developing a Snowpark application that needs to authenticate to Snowflake using Key Pair Authentication. Which of the following steps are essential for configuring the Snowflake CLI to enable Key Pair Authentication and then correctly create a Snowpark session? (Select TWO)
정답: C,D
설명: (Fast2test 회원만 볼 수 있음)
Consider a scenario where you're developing a Snowpark stored procedure that accesses sensitive data'. Which of the following strategies, when used together, provide a comprehensive approach to secure this stored procedure and protect the underlying data?
Select all that apply:
Select all that apply:
정답: A,B,E
설명: (Fast2test 회원만 볼 수 있음)
You have a Snowpark DataFrame 'df that you want to persist as a Snowflake table. You need to ensure the following requirements are met: 1. The table should be created if it does not exist. 2. If the table exists, the new data should be merged with the existing data based on a 'primary_key' column. 3. If a row with a matching 'primary_key' already exists in the target table, update the existing row with the values from the 'df DataFrame. Otherwise, insert the row from 'df into the target table. Which of the following approaches can achieve this using Snowpark?
정답: A,C
설명: (Fast2test 회원만 볼 수 있음)
You are tasked with creating a Snowpark stored procedure to perform complex data transformations using a Pandas DataFrame. You want to optimize the performance of the stored procedure by leveraging Snowpark's distributed execution capabilities. Consider the following code snippet:

Which of the following changes to the above code will significantly improve the performance by utilizing Snowpark's distributed execution?

Which of the following changes to the above code will significantly improve the performance by utilizing Snowpark's distributed execution?
정답: C
설명: (Fast2test 회원만 볼 수 있음)
Consider the following Snowpark Python code snippet that defines and applies a UDF:

Which of the following modifications would MOST likely improve the performance of this code, assuming the DataFrame 'df contains a large number of rows?

Which of the following modifications would MOST likely improve the performance of this code, assuming the DataFrame 'df contains a large number of rows?
정답: A,E
설명: (Fast2test 회원만 볼 수 있음)
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?
정답: A
설명: (Fast2test 회원만 볼 수 있음)
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)
정답: A,C
설명: (Fast2test 회원만 볼 수 있음)
You are tasked with optimizing a Snowpark application that uses a Python UDF to perform complex string manipulations on a large dataset. The current implementation uses a scalar UDF. You are considering converting it to a vectorized UDF. What are the key considerations and potential limitations you need to address during the conversion to ensure correctness and optimal performance? Choose all that apply:
정답: A,B,E
설명: (Fast2test 회원만 볼 수 있음)
You are developing a Snowpark application to process sales data. The application uses a UDF that calls an external Python library with a large memory footprint. After deploying the application, you observe that the Snowflake warehouse frequently runs out of memory, causing the application to fail. Which of the following strategies would be MOST effective in mitigating this issue, while minimizing cost and maintaining performance? Assume the data volume is relatively large and the UDF is computationally intensive.
정답: D
설명: (Fast2test 회원만 볼 수 있음)
Consider the following Snowpark code snippet designed to process data from an event table and calculate a rolling average:

After deploying this code, you observe that the rolling average calculation is significantly slower than expected, even though the virtual warehouse is adequately sized. What is the MOST effective way to optimize the performance of this rolling average calculation in Snowpark, considering the size of window_size ?

After deploying this code, you observe that the rolling average calculation is significantly slower than expected, even though the virtual warehouse is adequately sized. What is the MOST effective way to optimize the performance of this rolling average calculation in Snowpark, considering the size of window_size ?
정답: E
설명: (Fast2test 회원만 볼 수 있음)
You have a Snowpark DataFrame containing sensor data'. You need to write this data to a Snowflake stage 'sensor_stage' , creating a new set of files every hour based on the 'timestamp' column (data type: Timestamp). You also want to ensure that the file names include the hour of the timestamp and are written in Avro format with Zstandard compression. The directory structure on the stage should reflect the hourly partitioning. Which of the following approaches offers the most efficient and scalable way to achieve this, while minimizing the number of files written per hour?
정답: A
설명: (Fast2test 회원만 볼 수 있음)