𝔖 Scriptorium
✦   LIBER   ✦

📁

Snowflake Cookbook: Techniques for building modern cloud data warehousing solutions

✍ Scribed by Hamid Mahmood Qureshi, Hammad Sharif


Publisher
Packt Publishing
Tongue
English
Leaves
330
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


Develop modern solutions with Snowflake's unique architecture and integration capabilities; process bulk and real-time data into a data lake; and leverage time travel, cloning, and data-sharing features to optimize data operations

Key Features

  • Build and scale modern data solutions using the all-in-one Snowflake platform
  • Perform advanced cloud analytics for implementing big data and data science solutions
  • Make quicker and better-informed business decisions by uncovering key insights from your data

Book Description

Snowflake is a unique cloud-based data warehousing platform built from scratch to perform data management on the cloud. This book introduces you to Snowflake's unique architecture, which places it at the forefront of cloud data warehouses.

You'll explore the compute model available with Snowflake, and find out how Snowflake allows extensive scaling through the virtual warehouses. You will then learn how to configure a virtual warehouse for optimizing cost and performance. Moving on, you'll get to grips with the data ecosystem and discover how Snowflake integrates with other technologies for staging and loading data.

As you progress through the chapters, you will leverage Snowflake's capabilities to process a series of SQL statements using tasks to build data pipelines and find out how you can create modern data solutions and pipelines designed to provide high performance and scalability. You will also get to grips with creating role hierarchies, adding custom roles, and setting default roles for users before covering advanced topics such as data sharing, cloning, and performance optimization.

By the end of this Snowflake book, you will be well-versed in Snowflake's architecture for building modern analytical solutions and understand best practices for solving commonly faced problems using practical recipes.

What you will learn

  • Get to grips with data warehousing techniques aligned with Snowflake's cloud architecture
  • Broaden your skills as a data warehouse designer to cover the Snowflake ecosystem
  • Transfer skills from on-premise data warehousing to the Snowflake cloud analytics platform
  • Optimize performance and costs associated with a Snowflake solution
  • Stage data on object stores and load it into Snowflake
  • Secure data and share it efficiently for access
  • Manage transactions and extend Snowflake using stored procedures
  • Extend cloud data applications using Spark Connector

Who this book is for

This book is for data warehouse developers, data analysts, database administrators, and anyone involved in designing, implementing, and optimizing a Snowflake data warehouse. Knowledge of data warehousing and database and cloud concepts will be useful. Basic familiarity with Snowflake is beneficial, but not necessary.

Table of Contents

  1. Getting Started with Snowflake
  2. Managing the Data Life Cycle
  3. Loading and Extracting Data into and out of Snowflake
  4. Building Data Pipelines in Snowflake
  5. Data Protection and Security in Snowflake
  6. Performance and Cost Optimization
  7. Secure Data Sharing
  8. Back to the Future with Time Travel
  9. Advanced SQL Techniques
  10. Extending Snowflake's Capabilities

✦ Table of Contents


Cover
Title page
Copyright and Credits
Dedication
Contributors
Table of Contents
Preface
Chapter 1:Getting Started with Snowflake
Technical requirements
Creating a new Snowflake instance
Getting ready
How to do it…
How it works…
Creating a tailored multi-cluster virtual warehouse
Getting ready
How to do it…
How it works…
There's more…
Using the Snowflake WebUI and executing a query
Getting ready
How to do it…
How it works…
Using SnowSQL to connect to Snowflake
Getting ready
How to do it…
How it works…
There's more…
Connecting to Snowflake with JDBC
Getting ready
How to do it…
How it works…
There's more…
Creating a new account admin user and understanding built-in roles
How to do it…
How it works…
There's more…
Chapter 2: Managing the Data Life Cycle
Technical requirements
Managing a database
Getting ready
How to do it…
How it works…
There's more…
Managing a schema
Getting ready
How to do it…
How it works…
There's more…
Managing tables
Getting ready
How to do it…
How it works…
There's more…
Managing external tables and stages
Getting ready
How to do it…
How it works…
There's more…
Managing views in Snowflake
Getting ready
How to do it…
How it works…
There's more…
Chapter 3: Loading and Extracting Data into and out of Snowflake
Technical requirements
Configuring Snowflake access to private S3 buckets
Getting ready
How to do it…
How it works…
Loading delimited bulk data into Snowflake from cloud storage
Getting ready
How to do it…
How it works…
Loading delimited bulk data into Snowflake from your local machine
Getting ready
How to do it…
How it works…
Loading Parquet files into Snowflake
Getting ready
How to do it…
How it works…
Making sense of JSON semi-structured data and transforming to a relational view
Getting ready
How to do it…
How it works…
Processing newline-delimited JSON (or NDJSON) into a Snowflake table
Getting ready
How to do it…
How it works…
Processing near real-time data into a Snowflake table using Snowpipe
Getting ready
How to do it…
How it works…
Extracting data from Snowflake
Getting ready
How to do it…
How it works…
Chapter 4: Building Data Pipelines in Snowflake
Technical requirements
Creating and scheduling a task
Getting ready
How it works…
Conjugating pipelines through a task tree
Getting ready
How to do it…
How it works…
Querying and viewing the task history
Getting ready
How to do it…
How it works…
Exploring the concept of streams to capture table-level changes
Getting ready
How to do it…
How it works…
Combining the concept of streams and tasks to build pipelines that process changed data on a schedule
How to do it…
How it works…
Converting data types and Snowflake's failure management
How to do it…
How it works…
There's more…
Managing context using different utility functions
Getting ready
How to do it…
How it works…
There's more…
Chapter 5: Data Protection and Security in Snowflake
Technical requirements
Setting up custom roles and completing the role hierarchy
Getting ready
How to do it…
How it works…
There's more…
Configuring and assigning a default role to a user
Getting ready
How to do it…
How it works…
There's more…
Delineating user management from security and role management
Getting ready
How to do it…
How it works…
Configuring custom roles for managing access to highly secure data
Getting ready
How to do it…
How it works…
Setting up development, testing, pre-production, and production database hierarchies and roles
Getting ready
How to do it…
How it works…
Safeguarding the ACCOUNTADMIN role and users in the ACCOUNTADMIN role
Getting ready
How to do it…
How it works…
Chapter 6: Performance and Cost Optimization
Technical requirements
Examining table schemas and deriving an optimal structure for a table
Getting ready
How to do it…
How it works…
Identifying query plans and bottlenecks
Getting ready
How to do it…
How it works…
Weeding out inefficient queries through analysis
Getting ready
How to do it…
How it works…
Identifying and reducing unnecessary Fail-safe and Time Travel storage usage
Getting ready
How to do it…
How it works…
Projections in Snowflake for performance
Getting ready
How to do it…
How it works…
There's more…
Analyzing query plans over large tables and identifying opportunities for modifying clustering keys
Getting ready
How to do it…
How it works…
Optimizing virtual warehouse scale
Getting ready
How to do it…
How it works…
Chapter 7: Secure Data Sharing
Technical requirements
Sharing a table with another Snowflake account
Getting ready
How to do it…
How it works…
Sharing data through a view with another Snowflake account
Getting ready
How to do it…
How it works…
Sharing a complete database with another Snowflake account and setting up future objects to be shareable
Getting ready
How to do it…
How it works…
Creating reader accounts and configuring them for non-Snowflake sharing
Getting ready
How to do it…
How it works…
Getting ready
How to do it…
How it works…
Keeping costs in check when sharing data with non-Snowflake users
Getting ready
How to do it…
How it works…
Chapter 8: Back to the Future with Time Travel
Technical requirements
Using Time Travel to return to the state of data at a particular time
Getting ready
How to do it…
How it works…
Using Time Travel to recover from the accidental loss of table data
Getting ready
How to do it…
How it works…
Identifying dropped databases, tables, and other objects and restoring them using Time Travel
Getting ready
How to do it…
How it works…
Using Time Travel in conjunction with cloning to improve debugging
Getting ready
How to do it…
How it works…
Using cloning to set up new environments based on the production environment rapidly
Getting ready
How to do it…
How it works…
Chapter 9: Advanced SQL Techniques
Technical requirements
Managing timestamp data
Getting ready
How to do it…
How it works…
Shredding date data to extract Calendar information
Getting ready
How to do it…
How it works…
Unique counts and Snowflake
Getting ready
How to do it…
How it works…
Managing transactions in Snowflake
Getting ready
How to do it…
How it works…
Ordered analytics over window frames
Getting ready
How to do it…
How it works…
Generating sequences in Snowflake
Getting ready
How to do it…
How it works…
Chapter 10: Extending Snowflake Capabilities
Technical requirements
Creating a Scalar user-defined function using SQL
Getting ready
How to do it...
How it works...
Creating a Table user-defined function using SQL
Getting ready
How to do it
How it works
Creating a Scalar user-defined function using JavaScript
Getting ready
How to do it
How it works
Creating a Table user-defined function using JavaScript
Getting ready
How to do it
How it works
Connecting Snowflake with Apache Spark
Getting ready
How to do it
How it works
Using Apache Spark to prepare data for storage on Snowflake
Getting ready
How to do it
How it works
Why subscribe?
About Packt
Other Books You May Enjoy
Index


📜 SIMILAR VOLUMES


Snowflake Cookbook: Techniques for build
✍ Hamid Mahmood Qureshi, Hammad Sharif 📂 Library 🏛 Packt Publishing 🌐 English

<p><span>Develop modern solutions with Snowflake's unique architecture and integration capabilities; process bulk and real-time data into a data lake; and leverage time travel, cloning, and data-sharing features to optimize data operations</span></p><h4><span>Key Features</span></h4><ul><li><span><s

Amazon Redshift Cookbook: Recipes for bu
✍ Shruti Worlikar, Thiyagarajan Arumugam, Harshida Patel 📂 Library 📅 2021 🏛 Packt Publishing 🌐 English

<p><b>Discover how to build a cloud-based data warehouse at petabyte-scale that is burstable and built to scale for end-to-end analytical solutions</b></p><h4>Key Features</h4><ul><li>Discover how to translate familiar data warehousing concepts into Redshift implementation</li><li>Use impressive Red

Google Cloud Cookbook: Practical Solutio
✍ Rui Costa, Drew Hodun 📂 Library 📅 2021 🏛 O'Reilly Media 🌐 English

<span><div><p>Get quick hands-on experience with Google Cloud. This cookbook provides a variety of self-contained recipes that show you how to use Google Cloud services for your enterprise application. Whether you're looking for practical ways to apply microservices, AI, analytics, security, or netw

Google Cloud Cookbook: Practical Solutio
✍ Rui Costa, Drew Hodun 📂 Library 📅 2021 🏛 O'Reilly Media 🌐 English

<div><p>Get quick hands-on experience with Google Cloud. This cookbook provides a variety of self-contained recipes that show you how to use Google Cloud services for your enterprise application. Whether you're looking for practical ways to apply microservices, AI, analytics, security, or networking

Google Cloud Cookbook: Practical Solutio
✍ Rui Costa, Drew Hodun 📂 Library 📅 2021 🏛 O'Reilly Media 🌐 English

<div><p>Get quick hands-on experience with Google Cloud. This cookbook provides a variety of self-contained recipes that show you how to use Google Cloud services for your enterprise application. Whether you're looking for practical ways to apply microservices, AI, analytics, security, or networking

Google Cloud Cookbook: Practical Solutio
✍ Rui Costa, Drew Hodun 📂 Library 📅 2021 🏛 O'Reilly Media 🌐 English

Get quick hands-on experience with Google Cloud. This cookbook provides a variety of self-contained recipes that show you how to use Google Cloud services for your enterprise application. Whether you're looking for practical ways to apply microservices, AI, analytics, security, or networking solutio