Using Snowpark in Snowflake CLI¶
The Snowpark API provides an intuitive library for querying and processing data at scale in Snowflake, without using SQL. Using a library for any of three languages, you can build applications that process data in Snowflake—without moving data to the system where your application code runs—and process at scale as part of the elastic and serverless Snowflake engine.
Snowflake CLI gives developers convenient tooling for developing and managing their Snowpark functions and procedures. To create and maintain Snowpark functions and procedures, use the following process:
- Initialize — create a boilerplate - The - snow init <project-name> --template example_snowparkcommand creates a boilerplate project that you can customize.
- Create — create a project definition - You edit the - snowflake.ymlfile with the project details.
- Build — create artifacts - The - snow snowpark buildcommand builds the Snowpark project as a- .ziparchive that can be used by the- snow snowpark deploycommand. The archive is built using only the- srcdirectory specified in the- snowflake.ymlfile.
- Deploy — create Snowflake objects - The - snow snowpark deploycommand uploads local files to the specified stage and creates procedure and function objects defined in the project.
- Execute — use deployed procedures and functions - The - snow snowpark executecommand executes deployed procedures and functions.
- Upload — upload already implemented Snowpark functions, procedures, and custom packages, such as from PyPi, in your projects. - The - snow snowpark packagecommands let you reuse existing packages.
- Manage — manage your Snowpark functions and procedures - The - snow snowparkand- snow objectcommands let you create, list, execute, and delete Snowpark functions and procedures.