Skip to Content
AWS认证数据工程师助理考试指南
book

AWS认证数据工程师助理考试指南

by Sakti Mishra, Dylan Qu, Anusha Challa
August 2025
Beginner to intermediate
476 pages
5h 53m
Chinese
O'Reilly Media, Inc.
Content preview from AWS认证数据工程师助理考试指南

第 8 章 实施批处理和流式管道

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

在前几章中,我们概述了 AWS 数据分析服务,并介绍了如何设计数据摄取管道、应用转换、管理数据存储、实施安全和治理,以及如何实现分析工作负载的运行效率。

在本章中,我们将提供批处理和流管道流行用例的实践实施指南。在开始之前,请确保您已创建 AWS 账户并配置了第 2 章所述的 IAM 权限。

数据处理管道

数据处理管道 是一连串的步骤,用于提炼和转换数据,并将其转换成终端用户可用于分析的格式。需要转换数据的用例可能包括以下内容:

  • 清理数据并提高数据质量

  • 通过与内部数据集聚合并应用特定业务规则来转换数据

  • 格式化数据用于时间序列分析或为机器学习模型开发准备数据

  • 创建特定的数据模型,以加快数据分析或 BI 报告的速度

  • 以特定格式提供数据,以便与下游系统共享

图 8-1表示数据管道的高级架构,其中包括数据源、数据摄取、数据处理和数据消费层。

图 8-1. 数据处理管道的高层架构

接下来,让我们以公开可用的示例数据集为例,在 AWS 中通过详细的实践步骤来实现批处理和流式处理管道。

实施批处理管道

批量处理 是指将多个记录或文件合并在一起一次性处理。处理频率可以计划或按需执行。让我们以一个用例为例,按照逐步实施指南,以批量方式执行数据处理作业。

注意

请注意,根据 AWS 对每项服务的公开定价,实施端到端解决方案会产生一些成本影响。除 AWS Glue PySpark 作业外,其余服务可能符合免费层级的条件,因此请查看AWS 免费层级文档

用例和架构概述

图 8-2显示了包括以下步骤的高层架构 :

步骤 1.1
将输入数据集上传到 Amazon S3 原始输入桶。
步骤 1.21 和 1.22
通过 Amazon EventBridge 调度器触发 AWS Glue PySpark。
步骤 1.3
Glue PySpark 作业将转换后的数据加载到 Amazon Redshift 表中。
步骤 2.1 和 2.2
数据分析师构建 Amazon QuickSight 可视化,汇总 Redshift 表中的数据。
图 8-2. 批量数据处理管道的高层架构

输入数据集概述

为了解释用例 ,我们将参考公开的销售数据集,其中包含一个虚构企业的 20,000 多条销售机会记录。每条记录都有指定以下内容的字段:

  • 日期,可能是发现机会的日期

  • 销售人员姓名

  • 机会所属的细分市场

  • 预测的月收入

在本用例中,我们假设这些销售 CSV 文件由企业的销售团队维护,他们会在每月月底将输入文件上传到亚马逊 S3 输入桶。汇总输出数据通过一系列数据准备步骤创建,业务团队使用输出数据创建商业智能 (BI) 报告。

分步实施指南

在开始这些步骤之前,请确保您拥有创建解决方案所需资源的权限。请注意,我们使用 us-east-1 区域来部署解决方案,但您可以在开始之前选择自己喜欢的区域。

注意

请注意,本章中的实施步骤提到了 ...

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

设计机器学习系统

设计机器学习系统

Chip Huyen
摆脱构建陷阱

摆脱构建陷阱

Melissa Perri

Publisher Resources

ISBN: 9798341667655