Snowpark Developer Guide for Python

The Snowpark library provides an intuitive API for querying and processing data in a data pipeline. Using the Snowpark library, you can build applications that process data in Snowflake without moving data to the system where your application code runs. You can also automate data transformation and processing by writing stored procedures and scheduling those procedures as tasks in Snowflake.

Get Started

You can write Snowpark Python code in a local development environment or in a Python worksheet in Snowsight.

If you need to write a client application, set up a local development environment by doing the following:

  1. Set up your preferred development environment to build Snowpark apps. See Setting Up Your Development Environment for Snowpark Python.

  2. Establish a session to interact with the Snowflake database. See Creating a Session for Snowpark Python.

If you want to write a stored procedure to automate tasks in Snowflake, use Python worksheets in Snowsight. See Writing Snowpark Code in Python Worksheets.

Write Snowpark Python Code

You can query, process, and transform data in a variety of ways using Snowpark Python.

Perform Machine Learning Tasks

You can use Snowpark Python to perform machine learning tasks like training models:

Troubleshoot Snowpark Python Code

Troubleshoot your code with logging statements and by viewing the underlying SQL. See Troubleshooting with Snowpark Python.

Record and Analyze Data About Code Execution

You can record log messages and trace events in an event table for later analysis. For more information, see Logging, tracing, and metrics.

API Reference

The Snowpark for Python API reference contains extensive details about the available classes and methods. See Snowpark Library for Python API Reference.

The pandas on Snowflake API reference contains extensive details about the available classes and methods. See Snowpark pandas API .

For the list of changes to the API between versions, see Snowpark Library for Python release notes.