nerdexam
SnowflakeSnowflake

SOL-C01 · Question #245

SOL-C01 Question #245: Real Exam Question with Answer & Explanation

The correct answer is D: Use the `snowflake-snowpark-python' library to create a Snowpark session, package the UDF and. Option D describes the recommended approach using Snowpark and Conda. This allows for proper dependency management and version control by packaging the UDF and its dependencies into a Conda environment. Options A and C lack proper dependency management. Option B is not feasible a

Querying and Performance

Question

Consider a scenario where you need to create a custom function (UDF) in Snowflake that uses an external Python library not available in the Snowflake Anaconda channel. How would you package and deploy this UDF, ensuring proper dependency management and version control?

Options

  • ACreate a Python virtual environment, install the necessary libraries, and upload the entire
  • BInstall the required Python libraries directly on the Snowflake compute nodes using a startup script,
  • CPackage the UDF code and the external library as a single Python file, upload it to a Snowflake
  • DUse the `snowflake-snowpark-python' library to create a Snowpark session, package the UDF and
  • ECopy the source code of the external Python library and include it directly within the UDF

Explanation

Option D describes the recommended approach using Snowpark and Conda. This allows for proper dependency management and version control by packaging the UDF and its dependencies into a Conda environment. Options A and C lack proper dependency management. Option B is not feasible as you cannot directly install packages on Snowflake compute nodes. Option E is impractical and violates code organization principles.

Topics

#Python UDFs#External Dependencies#Snowpark#Dependency Management

Community Discussion

No community discussion yet for this question.

Full SOL-C01 PracticeBrowse All SOL-C01 Questions