問題文
A data scientist writes Python that filters and aggregates a 4 billion row table, then fits a model on the aggregated result. The goal is to keep the heavy filtering and aggregation inside Snowflake. Which approach achieves that?
選択肢
- Register the Python code as an external function so that the filtering and the aggregation both run in the remote service that the function calls out to on every batch of rows.
- Read the full table into a local dataframe with the Python connector, which moves the rows to the laptop first, then filter and aggregate in the client process.
- Export the table to files on a stage, download the files, and process them with a local library.
- Express the filtering and aggregation with a Snowpark dataframe, so the operations are translated into statements that the warehouse executes.