The Ultimate Guide to Snowpark

Book description

Develop robust data pipelines, deploy mature machine learning models, and build secure data apps with Snowflake Snowpark using Python

Key Features

  • Get to grips with Snowflake Snowpark’s basic and advanced features
  • Implement workloads in domains like data engineering, data science, and data applications using Snowpark with Python
  • Deploy Snowpark in production with practical examples and best practices
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

Snowpark is a powerful framework that helps you unlock numerous possibilities within the Snowflake Data Cloud. However, without proper guidance, leveraging the full potential of Snowpark with Python can be challenging. Packed with practical examples and code snippets, this book will be your go-to guide to using Snowpark with Python successfully.

The Ultimate Guide to Snowpark helps you develop an understanding of Snowflake Snowpark and how it enables you to implement workloads in data engineering, data science, and data applications within the Data Cloud. From configuration and coding styles to workloads such as data manipulation, collection, preparation, transformation, aggregation, and analysis, this guide will equip you with the right knowledge to make the most of this framework. You'll discover how to build, test, and deploy data pipelines and data science models. As you progress, you’ll deploy data applications natively in Snowflake and operate large language models (LLMs) using Snowpark container services.

By the end of this book, you'll be able to leverage Snowpark's capabilities and propel your career as a Snowflake developer to new heights.

What you will learn

  • Harness Snowpark with Python for diverse workloads
  • Develop robust data pipelines with Snowpark using Python
  • Deploy mature machine learning models
  • Explore the process of developing, deploying, and monetizing native apps using Snowpark
  • Deploy and operate containers in Snowpark
  • Discover the pathway to adopting Snowpark effectively in production

Who this book is for

This book is for data engineers, data scientists, developers, and data practitioners seeking an in-depth understanding of Snowpark’s features and best practices for deploying various workloads in Snowpark using the Python programming language. Basic knowledge of SQL, proficiency in Python, an understanding of data engineering and data science basics, and familiarity with the Snowflake Data Cloud platform are required to get the most out of this book.

Table of contents

  1. The Ultimate Guide to Snowpark
  2. Foreword
  3. Contributors
  4. About the authors
  5. About the reviewers
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Conventions used
    6. Get in touch
    7. Share your thoughts
    8. Download a free PDF copy of this book
  7. Part 1: Snowpark Foundation and Setup
  8. Chapter 1: Discovering Snowpark
    1. Introducing Snowpark
    2. Leveraging Python for Snowpark
      1. Capabilities of Snowpark for Python
      2. Why Python for Snowpark
    3. Understanding Snowpark for different workloads
      1. Data science and ML
      2. Data engineering
      3. Data governance and security
      4. Data applications
    4. Realizing the value of using Snowpark
    5. Summary
  9. Chapter 2: Establishing a Foundation with Snowpark
    1. Technical requirements
    2. Configuring the Snowpark development environment
      1. Snowpark Python worksheet
      2. Snowpark development in a local environment
    3. Operating with Snowpark
      1. The Python Engine
      2. Client APIs
      3. UDFs
    4. Establishing a project structure for Snowpark
    5. Summary
  10. Part 2: Snowpark Data Workloads
  11. Chapter 3: Simplifying Data Processing Using Snowpark
    1. Technical requirements
    2. Data ingestion
      1. Important note on datasets
      2. Ingesting a CSV file into Snowflake
      3. Ingesting JSON into Snowflake
      4. Ingesting Parquet files into Snowflake
      5. Ingesting images into Snowpark
    3. Data exploration and transformation
      1. Data exploration
      2. Data transformations
    4. Data grouping and analysis
      1. Data grouping
      2. Data analysis
    5. Summary
  12. Chapter 4: Building Data Engineering Pipelines with Snowpark
    1. Technical requirements
    2. Developing resilient data pipelines with Snowpark
      1. Traditional versus modern data pipelines
      2. Data engineering with Snowpark
      3. Implementing programmatic ELT with Snowpark
    3. Deploying efficient DataOps in Snowpark
      1. Developing a data engineering pipeline
    4. Overview of tasks in Snowflake
      1. Compute models for tasks
      2. Task graphs
      3. Managing tasks and task graphs with Python
    5. Implementing logging and tracing in Snowpark
      1. Event tables
      2. Setting up logging in Snowpark
      3. Handling exceptions in Snowpark
      4. Setting up tracing in Snowpark
      5. Comparison of logs and traces
    6. Summary
  13. Chapter 5: Developing Data Science Projects with Snowpark
    1. Technical requirements
    2. Data science in Data Cloud
      1. Data science and ML concepts
      2. The Data Cloud paradigm
      3. Why Snowpark for data science and ML?
      4. Introduction to Snowpark ML
      5. End-to-end ML with Snowpark
    3. Exploring and preparing data
      1. Missing value analysis
      2. Outlier analysis
      3. Correlation analysis
      4. Leakage variables
      5. Feature engineering
    4. Training ML models in Snowpark
      1. The efficiency of Snowpark ML
    5. Summary
  14. Chapter 6: Deploying and Managing ML Models with Snowpark
    1. Technical requirements
    2. Deploying ML models in Snowpark
      1. Snowpark ML model registry
    3. Managing Snowpark model data
      1. Snowpark Feature Store
      2. Benefits of Feature Store
      3. Feature stores versus data warehouses
      4. When to utilize versus when to avoid feature stores
    4. Summary
  15. Part 3: Snowpark Applications
  16. Chapter 7: Developing a Native Application with Snowpark
    1. Technical requirements
    2. Introduction to the Native Apps Framework
      1. Snowflake’s native application Landscape
      2. Native App Framework components
      3. Streamlit in Snowflake
      4. Benefits of Native Apps
    3. Developing the native application
      1. The Streamlit editor
      2. Running the Streamlit application
      3. Developing with the Native App Framework
    4. Publishing the native application
      1. Setting the default release directive
      2. Creating a listing for your application
    5. Managing the native application
      1. Viewing installed applications
      2. Viewing README for applications
      3. Managing access to the application
      4. Removing an installed application
    6. Summary
  17. Chapter 8: Introduction to Snowpark Container Services
    1. Technical requirements
    2. Introduction to Snowpark Container Services
      1. Data security in Snowpark Container Services
      2. Components of Snowpark Containers
    3. Setting up Snowpark Container Services
      1. Creating Snowflake objects
      2. Setting up the services
      3. Setting up the filter service
      4. Building the Docker image
      5. Deploying the service
    4. Setting up a Snowpark Container Service job
      1. Setting up the job
      2. Deploying the job
      3. Executing the job
    5. Deploying LLMs with Snowpark
      1. Preparing the LLM
      2. Registering the model
      3. Deploying the model to Snowpark Container Services
      4. Running the model
    6. Summary
  18. Index
    1. Why subscribe?
  19. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share your thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: The Ultimate Guide to Snowpark
  • Author(s): Shankar Narayanan SGS, Vivekanandan SS
  • Release date: May 2024
  • Publisher(s): Packt Publishing
  • ISBN: 9781805123415