让关系型数据库与 Amazon Redshift 无缝集成
使用 Zero ETL 将关系型数据库入仓到 Redshift 进行分析
![Olawale Olaleye Olawale Olaleye](https://d1.awsstatic.com/xuefezha-jennie/%e7%ba%a7%e5%88%ab_level%201.01c35fea97656a6beac50b0c8ae81e8afc1eedef.png)
![](https://d1.awsstatic.com/xuefezha-jennie/Group%20281.67a8494bd80a4bd979e37efcb490ada486dd72ae.png)
![](https://d1.awsstatic.com/xuefezha-jennie/Group%20287.a27381901d308706720071b52d42054d154eab4c.png)
![](https://d1.awsstatic.com/guoheng/product.2d7b328b4c088795e2ac7b9c03e03d54eb5ea73f.png)
采用这一全托管解决方案,用户无需构建或维护复杂的数据管道,便可从事务数据中获取具有时效性的见解,为关键的业务决策提供信息。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img1.d56c8f14459300802480a99746a94f0e62e10260.png)
开始部署
我们将使用现有的 Amazon Aurora MySQL 无服务器数据库和 Amazon Redshift 数据仓库。
首先,前往 Amazon RDS 控制台,然后在 Zero ETL 集成页面上选择“创建 Zero ETL 集成”。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img2.d8469102d02c1685fff205a95f1ee4f24c7176f2.png)
我们需要在“创建 Zero ETL 集成”页面上操作几个步骤,为 Amazon Aurora 数据库集群和 Amazon Redshift 数据仓库配置集成。
接下来,需要为集成定义一个标识符,然后选择“下一步”。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img3.961568a986b4db5994277159671b45c9e4b689f2.png)
在下一个页面,选择“浏览 RDS 数据库”来选择源数据库。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img4.73d53b9ace55131ee0b74019361a373165041a56.png)
在这一步可以将现有数据库选为源数据库。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img5.70b0ddc164caf7a85cf3d2a7c74e4bef81a9f40b.png)
下一步会询问目标 Amazon Redshift 数据仓库。在这一步,可以灵活选择我的账户或其他账户中的 Amazon Redshift Serverless 或 RA3 数据仓库。本次选的是“浏览 Redshift 数据仓库”。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img6.9c187d678402afd9662fac4a16b8b4f10f93b8e5.png)
然后选择目标数据仓库。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img7.3f90691ab6c4c1e7f7323f3e276dfbe1b28c6dd1.png)
因为 Amazon Aurora 需要复制到数据仓库中,所以需要添加额外的资源策略,并将 Aurora 数据库添加为 Amazon Redshift 数据仓库中的授权集成源。
为了解决这个问题,可以在 Amazon Redshift 控制台中选择手动更新,或者让 Amazon RDS 来帮助解决,即勾选此处的复选框。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img8.f6f12aa565d0cbdb51e2ad7fb81cee6dab45422a.png)
下一个页面会显示 Amazon RDS 将为我们执行的更改。选择“继续”。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img9.c071ee0161f3751640556d9d1fb7cad4b07a00b1.png)
可以在下一个页面配置标签和加密。Zero ETL 集成会默认使用亚马逊云科技密钥管理服务 (Amazon KMS) 对数据进行加密,也可以选择使用自己的密钥。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img10.e975be5248ff6a83aab4a60d376d188c11846eeb.png)
然后需要核对所有配置,并选择“创建 Zero ETL 集成”来创建集成。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img11.1a5a06dcf8a589d304255285ef2e8298529fea51.png)
Zero ETL 集成在几分钟后便会成功创建。然后切换到 Amazon Redshift,可以在“Zero ETL 集成”页面看到最近创建的 Zero ETL 集成。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img12.dd4f056fd243d6a04a08f95e7f8bd75c91059c59.png)
由于这个集成目前还没有 Amazon Redshift 中的目标数据库,所以需要创建一个。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img13.6b41173af40a6ffe58c4883452ceec0b3c3677de.png)
现在集成配置已经完成了。可以在这个页面上看到,集成现在是激活状态,已经复制了一个表格。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img14.48b070f1e8cbe412bdc15a71f2c7cd9d065908d8.png)
为了测试,我们在 Amazon Aurora 数据库中新建了一个表格,并在该表中插入一条记录。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img15.da6f9ef51bfdd8446dc9abbe46075f27625b548b.png)
然后切换到 Amazon Redshift 中的 Redshift Query Editor v2。可以在这里连接到作为集成的一部分而创建的数据库。可以运行一个简单的查询,看到 Amazon Redshift 中已经有了我们的数据。
![](https://d1.awsstatic.com/guoheng/seamlessly-integrate-relational-databases-with-amazon-redshift/zeroetl-redshift-img16.196d5a7a0b2810d2170fdd3ed4763c26105795b4.png)
Zero ETL 集成非常方便,原因有二:第一,可以将多个数据库集群的所有数据整合到一起并进行汇总分析;第二,事务数据不出几秒就会被写入 Amazon Aurora MySQL,也就是说 Zero ETL 集成的数据能与 Amazon Redshift 无缝衔接。
注意事项
可用性:Amazon Aurora 与 Amazon Redshift 的 Zero ETL 集成目前的可用区域包括美国东部的俄亥俄、弗吉尼亚北部,美国西部的俄勒冈,亚太地区的新加坡、悉尼、东京,以及欧洲的法兰克福、爱尔兰和斯德哥尔摩。
支持的数据库引擎:Amazon Aurora 与 Amazon Redshift 的 Zero ETL 集成目前支持Amazon Aurora MySQL 的兼容版本。支持 Amazon Aurora PostgreSQL 的兼容版本目前正在开发中。
定价:Amazon Aurora 与 Amazon Redshift 的 Zero ETL 集成无需额外费用。用户只需为创建和处理 Zero ETL 集成所创建的变更数据的现有 Amazon Aurora 和 Amazon Redshift 资源付费。