简体   繁体   English

使用 Azure 数据工厂将 Sharepoint 在线 csv 复制到数据湖

[英]Copy Sharepoint online csv to datalake using Azure Data Factory

I am trying to copy CSV file from Sharepoint online to Data lake using Data Factory.我正在尝试使用数据工厂将 CSV 文件从 Sharepoint 在线复制到数据湖。 I followed the below documentation.我遵循了以下文档。

https://docs.microsoft.com/en-us/azure/data-factory/connector-sharepoint-online-list?tabs=data-factory#copy-file-from-sharepoint-online https://docs.microsoft.com/en-us/azure/data-factory/connector-sharepoint-online-list?tabs=data-factory#copy-file-from-sharepoint-online

My pipeline looks below我的管道如下所示

在此处输入图像描述

I am getting errors in the copy data activity.我在复制数据活动中遇到错误。 My connection to Sharepoint is successful, and even I can download the CSV file using the base & relative URL.我与 Sharepoint 的连接是成功的,甚至我可以使用基础和相关 URL 下载 CSV 文件。

Below is my error以下是我的错误

Error code 2200

ErrorCode=HttpRequestFailedWithClientError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Http request failed with client error, status code 403 Forbidden, please check your activity settings. If you configured a baseUrl that includes path, please make sure it ends with '/'.
Request URL: https://xxxx.sharepoint.com/sites/39421875/_api/web/GetFileByServerRelativeUrl('/sites/39421875/Shared%20Documents/Test.csv')/$value.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.WebException,Message=The remote server returned an error: (403) Forbidden.,Source=System,'


在此处输入图像描述

My base URL: https://xxx.sharepoint.com/ Relative URL: sites/39421875/_api/web/GetFileByServerRelativeUrl('/sites/39421875/Shared Documents/Test.csv')/$value My base URL: https://xxx.sharepoint.com/ Relative URL: sites/39421875/_api/web/GetFileByServerRelativeUrl('/sites/39421875/Shared Documents/Test.csv')/$value

Not sure why the above error is coming?不确定为什么会出现上述错误? I added "/" in the base URL.我在基础 URL 中添加了“/”。

I tried multiple times, and the same error is happening.我尝试了多次,并且发生了同样的错误。 Even I tried to give a complete URL in the base URL but with no success.即使我试图在基础 URL 中给出一个完整的 URL 但没有成功。 I followed the documentation for the Additional Header.我遵循了附加 Header 的文档。

Can anyone advise?任何人都可以建议吗?

The above error is mainly because of Authorization Failure.上述错误主要是因为授权失败。 Please make sure to check whether the below permissions are granted or not.请务必检查是否授予以下权限。

Go to Azure Active directory -> App registration and open app -> API permission -> Add this permissions. Go 到 Azure 活动目录 -> 应用注册并打开应用 -> API 权限 -> 添加此权限。

参考

And also please follow the below reference: It has detailed information about app permission on specific site collection and Authorization of SharePoint.也请遵循以下参考:它有关于SharePoint的特定网站集合和授权的应用程序权限的详细信息。

Reference:参考:

DataFactory: Extract data from SharePoint Online by javiBI DataFactory:通过 javiBI 从 SharePoint Online 中提取数据

Access SharePoint Online using Postman by Shantha Kumar 使用 Shantha Kumar 的 Postman 在线访问 SharePoint

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Azure 数据工厂从 SFTP 获取 ZIP 文件到 Azure Datalake 并将其存储为 ZCC8D68D68C551C4ADEAFDE6 格式 - Get ZIP file from SFTP to Azure Datalake using Azure data factory and store it into CSV format Azure 数据工厂复制数据架构映射与接收器 Datalake - Azure Data Factory Copy Data schema mapping with sink Datalake 使用 Azure 数据工厂将数据从在线 sharePoint 导入 Azure Blob - importing data from online sharePoint to Azure Blob using Azure Data Factory Azure 数据工厂 - 使用带有文件路径的 CSV 复制文件 - Azure Data Factory - Copy files using a CSV with filepaths 如何使用 Azure 数据工厂将来自 Azure 分析服务的数据存储到 Azure Datalake 中? - How to store data from Azure Analysis services into Azure Datalake using Azure Data Factory? 从Azure Data Factory读取SharePoint联机列表 - Read SharePoint online lists from Azure Data Factory 如何在不使用 Dataflow 或 Databricks 或 Azure 数据湖分析的情况下使用 Azure 数据工厂删除文件中的重复项 - How to remove duplicates in a file using Azure Data Factory without using Dataflow or Databricks or Azure datalake analytics 将 FHIR 数据的 Azure API 复制到数据湖中 - Copy Azure API for FHIR data into datalake Azure 数据工厂和 SharePoint - Azure Data Factory and SharePoint 将数据从 Sharepoint 复制到 Azure 数据工厂中的 Blob - Copy data from Sharepoint to Blob in Azure Data Factory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM