从 Amazon Redshift 到 Sharepoint 列表的数据提取

问题描述 投票:0回答:1

我目前正在公司开展一个项目,将数据从 Amazon Redshift 提取到 Sharepoint 列表。一些背景信息:此数据流最初是使用 Azure 数据工厂 ETL(现已停用)实现自动化的。我正在考虑使用 PowerAutomate 来执行此操作,但我的客户寻求一种将数据从 Redshift 转换为 Sharepoint 的替代方法。

通常,在我的数据工程团队中,对于我们的端到端工作流程,我们利用 YAML 文件来指定数据的来源,以及有关数据如何从源位置/源文件移动到 Amazon S3 的作业(数据湖)存储为 parquet 文件。然后,我们会将数据从 S3 移至 Amazon Redshift 数据库,并使用 Airflow 编排这些步骤。

曾经有过将数据从 Sharepoint 列表提取到 Airflow 的实例,但这是我第一次收到将数据从 Redshift 移至 Sharepoint 列表的请求。

我相信客户寻求一种使用我们当前的工具(S3、Redshift、Airflow)创建的新数据流来设置这项工作,以便我们成为监控数据流的人。

任何想法/帮助将不胜感激。

我在这里有点困惑,因为我在网上找到的大多数解决方案都建议使用 PowerAutomate。

amazon-s3 yaml airflow amazon-redshift sharepoint-list
1个回答
0
投票

对于将数据从 Amazon Redshift 移动到 SharePoint 列表的项目,一种替代方法是使用 Python 构建自定义集成。 SharePoint 提供了一个 REST API,允许与其列表进行交互。您可以编写一个 Python 脚本来从 Redshift(或 S3,如果需要)提取数据,然后使用 SharePoint API 在 SharePoint 列表中插入或更新记录。该脚本可以是 Airflow DAG 的一部分,允许您保持控制并监控端到端的数据流。

要实现这一点,您将:

1.  Extract data from Redshift: Use Python’s libraries like psycopg2 or SQLAlchemy to connect to Redshift, query the data, and store it in a structured format.
2.  Push data to SharePoint: Using Python’s requests module, interact with the SharePoint API. Each record from Redshift can be translated into a SharePoint list item. You’ll need appropriate access tokens or authentication to SharePoint, which can be managed with OAuth or Azure AD credentials.

由于您已经使用 Airflow 编排工作流程,因此该解决方案可以顺利集成到您的 DAG 中。您可以利用 Airflow 的 PythonOperator 来触发脚本并监控其进度。此外,通过将数据转换保留在当前工具(S3、Redshift、Airflow)内,您可以保留对监控和扩展的完全控制,从而无需使用 PowerAutomate 等外部自动化工具。

这种方法将为您提供灵活性,并能够根据客户的需求定制数据流,同时将所有内容保留在现有生态系统内。

© www.soinside.com 2019 - 2024. All rights reserved.