Skip to Content
高级Snowflake
book

高级Snowflake

by Muhammad Fasih Ullah
September 2025
Beginner to intermediate
210 pages
3h 1m
Chinese
O'Reilly Media, Inc.
Content preview from 高级Snowflake

第 4 章. 雪花公园

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

Snowpark 是 Snowflake 生态系统中的一个强大工具,为开发人员提供了与 Snowflake 进行交互的灵活高效的方式。考虑一下 Sarah,她是一名数据科学家,曾花费数小时从 Snowflake 中提取数据,在本地使用 Python 进行处理,训练欺诈检测模型,然后努力将结果反馈到生产中。 有了 Snowpark,她重写了整个管道,使用熟悉的类似 pandas 的语法直接在 Snowflake 内部运行,处理数百万笔交易、训练模型并部署它们进行实时评分,而无需将数据移出平台。以前需要在系统间协调数小时的工作,现在只需几分钟就能完成。这就是 Snowpark 的强大之处:将您现有的 Python 技能直接应用于您的数据,消除了传统上使高级分析成为复杂协调挑战的摩擦。

在本章中,我将介绍 Snowpark、其关键概念以及 Snowflake 的一些机器学习 (ML) 功能。首先,我将解释什么是 Snowpark,然后将介绍 Snowpark 的 DataFrame API 和内联 UDF。之后,我将介绍 Snowflake ML,最后,在本章中,我将介绍一些使用 Snowpark 的实践示例。

为什么选择 Snowpark?

使用 Snowpark,您可以构建可扩展性应用程序,在 Snowflake 中查询或处理数据,无需将数据移出 Snowflake,充分利用云的无限规模。 Snowpark 是一个向量化引擎,可在数据所在位置附近运行,无需返回内存等更高级的处理机制,因此速度极快。 Snowpark 提供统一的编程接口,可跨三种编程语言处理向量化数据或标准 Snowflake 表中的数据集:Java、Scala 和 Python。 总而言之,它是一个完整的软件包,旨在消除进入 Snowflake 的障碍,让可能不想编写 SQL 脚本的更多技术用户能够在自己喜欢的界面中编写代码,并实现与 SQL 用户相同的结果。它将实现以下目标:

提高生产力

技术用户/开发人员可以在自己的环境中编写代码,而无需学习新的界面。

允许应用程序扩展

开发人员可以利用云的无限规模来编写和构建可扩展性应用程序,而不必担心资源问题。

减少数据移动

开发人员将不再需要将数据移动到 Snowflake 之外才能进行处理,从而减少了数据在网络上的移动。

现在让我们看看 Snowpark 在客户端和服务器端提供了哪些功能。

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

用数据进行沟通

用数据进行沟通

Carl Allchin
可解释人工智能实践指南

可解释人工智能实践指南

Michael Munn, David Pitman

Publisher Resources

ISBN: 9798341671003