A data scientist has developed a Streamlit application within a Snowflake Notebook to perform predictive analytics on customer churn. The application uses a pre-trained machine learning model stored as a Snowflake stage object. The model takes several customer features as input, which are stored in a Snowflake table called 'CUSTOMER FEATURES'. The data scientist needs to ensure that the model is loaded efficiently and that the inference is performed securely within the Snowflake environment, minimizing data movement.
Which of the following approaches would be the MOST efficient and secure for loading the pre- trained model and performing the inference within the Snowflake environment using a Streamlit application?
Correct Answer: B,E
Options B and E are the most appropriate for efficiency and security. Creating a Snowflake UDF or Snowpark session (E) keeps the data and model processing within the Snowflake environment, minimizing data movement and leveraging Snowflake's compute resources. UDFs or Snowpark session provide a secure and efficient way to perform the inference. Downloading model is not scalable (A), simple caching might be inefficent (C), storing procedure is not suitable as its not SQL based (D).