You are tasked with performing data profiling on a large customer dataset in Snowflake to identify potential issues with data quality and discover initial patterns. The dataset contains personally identifiable information (PII). Which of the following Snowpark and SQL techniques would be most appropriate to perform this task while minimizing the risk of exposing sensitive data during the exploratory data analysis phase?
A. Export the entire customer dataset to an external data lake for exploratory analysis using Spark and Python. Apply data masking in Spark before analysis.
B. Apply differential privacy techniques using Snowpark to add noise to the summary statistics generated from the customer data, masking the individual contributions of each customer while revealing overall trends.
C. Utilize Snowpark to create a sampled dataset (e.g., 1% of the original data) and perform all exploratory data analysis on the sample to reduce the data volume and potential exposure of PII.
D. Create a masked view of the customer data using Snowflake's dynamic data masking features. This view masks sensitive PII columns while allowing you to compute aggregate statistics and identify patterns using SQL and Snowpark functions. Columns like 'email' are masked using and columns like are masked using .
E. Directly query the raw customer data using SQL and Snowpark, computing descriptive statistics like mean, median, and standard deviation for all numeric columns and frequency counts for categorical columns. Store the results in a temporary table for further analysis.
正解:B,D
解説: (Pass4Test メンバーにのみ表示されます)
質問 2:
You are using a Snowflake Notebook to build a churn prediction model. You have engineered several features, and now you want to visualize the relationship between two key features: and , segmented by the target variable 'churned' (boolean). Your goal is to create an interactive scatter plot that allows you to explore the data points and identify any potential patterns.
Which of the following approaches is most appropriate and efficient for creating this visualization within a Snowflake Notebook?
A. Create a static scatter plot using Matplotlib directly within the Snowflake Notebook by converting the data to a Pandas DataFrame. This involves pulling all relevant data into the notebook's environment before plotting.
B. Leverage Snowflake's native support for Streamlit within the notebook to create an interactive application. Query the data directly from Snowflake within the Streamlit app and use Streamlit's plotting capabilities for visualization.
C. Use the 'snowflake-connector-python' to pull the data and use 'seaborn' to create static plots.
D. Write a stored procedure in Snowflake that generates the visualization data in a specific format (e.g., JSON) and then use a JavaScript library within the notebook to render the visualization.
E. Use the Snowflake Connector for Python to fetch the data, then leverage a Python visualization library like Plotly or Bokeh to generate an interactive plot within the notebook.
正解:B
解説: (Pass4Test メンバーにのみ表示されます)
質問 3:
You are tasked with building a machine learning pipeline in Snowpark Python to predict customer lifetime value (CLTV). You need to access and manipulate data residing in multiple Snowflake tables and views, including customer demographics, purchase history, and website activity. To improve code readability and maintainability, you decide to encapsulate data access and transformation logic within a Snowpark Stored Procedure. Given the following Python code snippet representing a simplified version of your stored procedure:
A. The replace=True, packages=['snowflake-snowpark-python', 'pandas', decorator registers the Python function as a Snowpark Stored Procedure, allowing it to be called from SQL.
B. The 'session.write_pandas(df, table_name='CLTV PREDICTIONS', auto_create_table=Truey function writes the Pandas DataFrame 'df containing the CLTV predictions directly to a new Snowflake table named , automatically creating the table if it does not exist.
C. The 'snowflake.snowpark.context.get_active_session()' function retrieves the active Snowpark session object, enabling interaction with the Snowflake database from within the stored procedure.
D. The 'session.table('CUSTOMER DEMOGRAPHICS')' method creates a local Pandas DataFrame containing a copy of the data from the 'CUSTOMER DEMOGRAPHICS' table.
E. The 'session.sql('SELECT FROM PURCHASE line executes a SQL query against the Snowflake database and returns the results as a list of Row objects.
正解:A,B,C,E
解説: (Pass4Test メンバーにのみ表示されます)
質問 4:
You are using Snowflake Cortex to analyze customer reviews. You have created a vector embedding for each review using a UDF that calls a remote LLM inference endpoint. Now you need to perform a similarity search to identify reviews that are similar to a given query review. Which of the following SQL queries leveraging vector functions in Snowflake is the MOST efficient and appropriate way to achieve this, assuming the 'REVIEW EMBEDDINGS' table has columns 'review_id' and 'embedding' (a VECTOR column) and query_embedding' is a pre-computed vector embedding?

A. Option E
B. Option C
C. Option A
D. Option D
E. Option B
正解:A
解説: (Pass4Test メンバーにのみ表示されます)
質問 5:
You are building a real-time fraud detection system using Snowpark ML and Dynamic Tables. The raw transaction data arrives continuously in a Snowflake stream. You need to create a data science pipeline that continuously transforms the data, trains a model, and scores new transactions in near real-time. Which combination of Snowflake features provides the BEST solution for achieving low latency and high throughput for this fraud detection system? Select all that apply:
A. Scheduled Snowflake tasks to retrain the model every hour based on the most recent transaction data.
B. Snowpipe with Auto-Ingest to load the raw transaction data into a staging table before processing it with Dynamic Tables.
C. Dynamic Tables to continuously transform the raw transaction data into features required by the model, with 'WAREHOUSE SIZE set to 'X-LARGE to ensure sufficient compute resources.
D. Snowflake Tasks with a 'WHEN SYSTEM$STREAM HAS clause to incrementally process new transactions from the stream and update feature tables.
E. Snowpark ML User-Defined Functions (UDFs) to apply the fraud detection model to incoming transactions, executed using Snowflake's vectorized engine for optimal performance.
正解:C,D,E
解説: (Pass4Test メンバーにのみ表示されます)
質問 6:
You have trained a fraud detection model using scikit-learn and want to deploy it in Snowflake using the Snowflake Model Registry. You've registered the model as 'fraud _ model' in the registry. You need to create a Snowflake user-defined function (UDF) that loads and executes the model. Which of the following code snippets correctly creates the UDF, assuming the model is a serialized pickle file stored in a stage named 'model_stage'?

A. Option E
B. Option C
C. Option A
D. Option D
E. Option B
正解:A
解説: (Pass4Test メンバーにのみ表示されます)
質問 7:
You are tasked with predicting the sales price of houses based on their size (square footage) using linear regression in Snowflake. You have a table named 'HOUSE PRICES' with columns 'SQUARE FOOTAGE' and 'SALES PRICE'. You want to calculate the slope and intercept using Snowflake SQL. Which of the following queries, considering potential NULL values in the data, is the MOST robust and statistically sound for calculating the slope and intercept for a simple linear regression model?

A. Option E
B. Option C
C. Option A
D. Option D
E. Option B
正解:B
解説: (Pass4Test メンバーにのみ表示されます)
質問 8:
You've built a complex machine learning model using scikit-learn and deployed it as a Python UDF in Snowflake. The UDF takes a JSON string as input, containing several numerical features, and returns a predicted probability However, you observe significant performance issues, particularly when processing large batches of data'. Which of the following approaches would be MOST effective in optimizing the performance of this UDF in Snowflake?
A. Pre-process the input data outside of the UDF using SQL transformations, reducing the amount of data passed to the UDF and simplifying the Python code.
B. Rewrite the UDF in Java or Scala to leverage the JVM's performance advantages over Python in Snowflake.
C. Use Snowflake's vectorized UDF feature to process data in micro-batches, minimizing the overhead of repeated Python interpreter initialization.
D. Increase the warehouse size to improve the overall compute resources available for UDF execution.
E. Serialize the scikit-learn model using 'joblib' instead of 'pickle' for potentially faster deserialization within the UDF.
正解:A,C
解説: (Pass4Test メンバーにのみ表示されます)
1165 お客様のコメント








菊池** -
これ一つでで勉強することにしました。コンパクトにまとまっていますから好きです。