[英]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.