nerdexam
SnowflakeSnowflake

SOL-C01 · Question #257

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

The correct answer is E: Create a zip file containing `special_function' and its dependencies, upload it to an internal stage,. The correct approach is to package the library and upload it to a stage, then use This allows users without ACCOUNTADMIN to use custom libraries. install' (A) requires specific permissions that the user lacks, and installs globally, which is undesirable. Creating an Anaconda inte

Querying and Performance

Question

A data scientist wants to use a library, 'special_function', within a Snowflake Notebook, but that library is not pre-installed in the Snowflake environment. The data scientist does not have ACCOUNTADMIN privileges. Which of the following methods could be used to make the 'special_function' library available for use within the notebook?

Options

  • AUse '!pip install special_function' in a notebook cell. This will install the library globally for all users
  • BRequest an ACCOUNTADMIN to create a Snowflake Anaconda channel using 'CREATE
  • CCreate a local virtual environment within the Snowflake Notebook's file system, install the library
  • DUpload the library file ('special_function.py' or similar) to a Snowflake stage, and then import the
  • ECreate a zip file containing `special_function' and its dependencies, upload it to an internal stage,

Explanation

The correct approach is to package the library and upload it to a stage, then use This allows users without ACCOUNTADMIN to use custom libraries. install' (A) requires specific permissions that the user lacks, and installs globally, which is undesirable. Creating an Anaconda integration (B) also requires ACCOUNTADMIN. Virtual environments (C) are not the typical way Snowflake handles external dependencies in notebooks and there are limitation regarding the location. Uploading directly and importing via relative path (D) can create import errors and may not work with all library types. Packages from a stage should be made available through

Topics

#Snowpark#Python Libraries#Dependency Management#Stages

Community Discussion

No community discussion yet for this question.

Full SOL-C01 PracticeBrowse All SOL-C01 Questions