This project provides a quickstart template for a typical Snowpark project. It is a Maven project that is also configured to properly package and upload dependencies to Snowflake in order to avoid missing class errors. It demonstrates how to use an interactive session, create temporary UDFs, and create persistent UDFs.
- Copy
src/resources/snowflake.conf.template
tosrc/resources/snowflake.conf
and fill in credentials - Run
mvn scala:run
to test things out - Modify this project to do what you need.
Note- the ./dependencies
directory must still be present for upload to Snowflake
- Copy
src/resources/snowflake.conf.template
tosrc/resources/snowflake.conf
and fill in credentials - Run
mvn package
to generate the JAR file - Run
java -jar target\snowpark-template-1.0-SNAPSHOT.jar
to execute - Modify this project to do what you need.
Main files:
src/resources/snowflake.conf.template
: Credentials templatesrc/main/scala/SnowparkApp.scala
: Main file demonstrating interactive Snowpark sessionssrc/main/sql/template.sql
: Demonstration of init code and creating an UDF directly from SQL using a JAR file handler
- Public-private key authentication not supported yet.