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. Refer to Setting Up Your Development Environment for Snowpark Python.

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

If you want to write a stored procedure to automate tasks in Snowflake, use Python worksheets in Snowsight. Refer to 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. Refer to 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, refer to Logging and Tracing Overview.

API Reference

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

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