Application and Extension Development¶
You can write applications that extend Snowflake, act as a client, or act as an integrating component.
Query and Process Data with the Snowpark API¶
Using Snowpark APIs in Java, Python, or Scala, you can build applications that process data in Snowflake without moving data to the system where your application code runs.
With Snowpark, you can:
Create apps, pipelines, and processing logic defined as Java, Python, or Scala.
Build data statements using libraries that integrate natively with supported languages.
Reduce the overhead of transferring data to and from Snowflake when processing the data.
Create user-defined functions by writing Java, Python, or Scala. Snowflake generates the required SQL code behind the scenes.
For a Snowpark overview, see Snowpark API.
Developer Guides¶
Guide |
Description |
---|---|
A guide and reference for writing Snowpark code in Java. |
|
A guide and reference for writing Snowpark code in Python. |
|
A guide and reference for writing Snowpark code in Scala. |
|
A guide for writing code to record log messages stored in an event table. |
|
A guide for writing code to record trace data stored in an event table. |
Quickstarts¶
You can use the following quickstart tutorials to get a hands-on introduction to Snowpark.
Snowpark ML¶
Snowpark ML is a Python library for machine learning and data science in Snowflake, including preprocessing, modeling, model management, and data ingestion. It works with Snowpark Python, allowing you to use Snowpark DataFrames for training and test data.
Extend Snowflake with Procedures, User-Defined Functions, and External Functions¶
You can enhance and extend Snowflake by writing procedures, user-defined functions, and external functions.
With a procedure, you can perform scheduled or on-demand operations by executing code or SQL statements. You write logic in one of the supported programming languages.
With a user-defined function (UDF), you can run logic to calculate and return data. UDFs are useful for batch processing and integrating custom logic into SQL. You write logic in one of the supported programming languages.
With an external function, you can set up an integration between Snowflake and custom code running outside of Snowflake, then use the custom code as you would a user-defined function.
For more on choosing from these two options, see Choosing whether to write a stored procedure or a user-defined function.
Developer Guides¶
Guide |
Description |
---|---|
A guide to writing stored procedures, how to write handlers in the supported languages. |
|
A guide to writing UDFs, including how to write handlers in the supported languages. |
|
Design Guidelines and Constraints for Functions and Procedures |
General guidelines on security, conventions, and more. |
Information on building handler code that you’ll keep on a stage. |
|
A guide for accessing external network endpoints with UDF and procedure handlers. |
|
A guide to writing external functions, with which you can invoke code on other systems. |
|
A guide for writing code to record log messages that are stored in an event table. |
|
A guide for writing code to record trace data that is stored in an event table. |
Build a Client App with Drivers and APIs¶
You can integrate Snowflake operations into a client app. In addition to the Snowpark API, you can also use language- and platform-specific drivers.
Drivers¶
Drivers allow you to connect from your code or apps to Snowflake. Using languages such as C#, Go, and Python, you can write applications that perform operations on Snowflake. For specific information on each of the drivers you can use for access to Snowflake, see the following sections.
RESTful API¶
Using the Snowflake RESTful SQL API, you can access and update data over HTTPS and REST. For example, you can submit SQL statements, create and execute stored procedures, provision users, and so on.
In the SQL REST API, you submit a SQL statement for execution in the body of a POST
request. You then check execution status and
fetch results with GET
requests.
For the SQL REST API developers guide, see Snowflake SQL REST API.
Integrate with Other Systems¶
Snowflake includes connectors with APIs for integrating with systems outside Snowflake. Refer to the developer guides below for details.
Developer Guides¶
Connector |
Description |
---|---|
Apache Kafka is an event streaming platform. This connector can send events from Kafka to Snowflake for ingestion. |
|
Apache Spark is an analytics engine for large-scale data processing. The Spark connector can be integrated in Spark workloads to do more data processing directly on Snowflake to reduce data transfer and significantly improve performance. |
You can also integrate Snowflake with many other systems for exchanging data, performing analysis with machine learning, enhancing security, and more. For more on Snowflake integration with these systems, see Snowflake Ecosystem.
Supported Languages¶
Snowflake supports several languages for building apps and extensions. The following table lists the languages supported for development on Snowflake, along with what you can build with each.
Language |
Snowflake Feature |
---|---|
Java |
You can:
|
JavaScript |
You can:
|
PHP |
You can:
|
Python |
You can:
|
Scala |
You can:
|
Snowflake Scripting |
You can:
|
SQL |
You can:
|