Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Ultimate Guide to Snowpark

You're reading from   The Ultimate Guide to Snowpark Design and deploy Snowflake Snowpark with Python for efficient data workloads

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781805123415
Length 254 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Shankar Narayanan SGS Shankar Narayanan SGS
Author Profile Icon Shankar Narayanan SGS
Shankar Narayanan SGS
Vivekanandan SS Vivekanandan SS
Author Profile Icon Vivekanandan SS
Vivekanandan SS
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Part 1: Snowpark Foundation and Setup
2. Chapter 1: Discovering Snowpark FREE CHAPTER 3. Chapter 2: Establishing a Foundation with Snowpark 4. Part 2: Snowpark Data Workloads
5. Chapter 3: Simplifying Data Processing Using Snowpark 6. Chapter 4: Building Data Engineering Pipelines with Snowpark 7. Chapter 5: Developing Data Science Projects with Snowpark 8. Chapter 6: Deploying and Managing ML Models with Snowpark 9. Part 3: Snowpark Applications
10. Chapter 7: Developing a Native Application with Snowpark 11. Chapter 8: Introduction to Snowpark Container Services 12. Index 13. Other Books You May Enjoy

Setting up a Snowpark Container Service job

In this section, we will create a simple job to connect to a Snowflake table and conduct some feature engineering tasks by generating new columns. Subsequently, we’ll save the resultant data to the same table within the Snowflake environment. Unlike services, jobs are short-lived, providing a one-time execution of tasks.

In the next section, we will set up the container job.

Setting up the job

For the job, instead of the Flask server implementation for services, we’ll utilize a straightforward main.py file to execute the job action. We will perform the following steps to set up the job.

Job code

The code for this section is in our GitHub repository under the chapter_8 folder. The folder contains the following files, which are required for the job.

The main.py file

The main.py file is the core Python script for orchestrating the job’s execution. At its heart lies the following run_job() function, invoked...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime