A Snowpark Python UDF must use a third-party library (e.g., 'scikit-learn') during transformation. Which TWO are valid ways to make the dependency available to the UDF? (Select TWO)
- A. Specify the package in the packages= argument when registering the UDF, drawing from the Snowflake Anaconda channel✓ Correct
- B. Grant the UDF the EXTERNAL ACCESS privilege on the public PyPI endpoint by default
- C. Upload a .zip/.whl of the library to a stage and reference it with imports= when registering the UDF✓ Correct
- D. Add the library name in a COMMENT on the UDF so Snowflake resolves it automatically
- E. Run 'pip install scikit-learn' inside the UDF handler at execution time
Explanation
Snowflake resolves declared packages from the curated Snowflake Anaconda channel via packages=, and custom or unavailable libraries can be staged and referenced through imports=. UDF sandboxes have no outbound internet by default, so pip install at runtime fails. External access integrations must be explicitly created and granted and are not enabled by default, and they are for network calls rather than dependency resolution. COMMENT is purely metadata.