【发布时间】:2022-10-24 01:20:51
【问题描述】:
我目前正在使用 HTTP 服务链接对 API 进行请求调用。
我正在尝试添加以下相对网址 @concat('https://duedil.io/v4/company/gb/', dataset().companyId, '/financials.json')
实际的链接服务如下所示:
我收到了错误
{
"errorCode": "2200",
"message": "ErrorCode=HttpInvalidUrlAddress,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Http Url Address 'https://duedil.io/v4/company/gb/https://duedil.io/v4/company/gb/02690345/financials.json' is invalid.,Source=Microsoft.DataTransfer.ClientLibrary,'",
"failureType": "UserError",
"target": "Copy dueREST to ADLS",
"details": []
}
我删除了
@concat('https://duedil.io/v4/company/gb/', dataset().companyId, '/financials.json')
但是,每当我现在尝试在相对 URL 中输入任何内容时,我什么都得不到,这意味着如果我要添加一些无意义的东西,例如“myrelativeurl”
我会得到
{
"errorCode": "2200",
"message": "ErrorCode=HttpRequestFailedWithUnauthorizedError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Http request failed with status code 401 Unauthorized, usually this is caused by invalid credentials, please check your activity settings.\nRequest URL: https://duedil.io/v4/company/gb/.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.WebException,Message=The remote server returned an error: (401) Unauthorized.,Source=System,'",
"failureType": "UserError",
"target": "Copy dueREST to ADLS",
"details": []
但我预计至少会出现以下错误:
https://duedil.io/v4/company/gb/myrelativeurl
有人可以让我知道为什么相对网址突然根本没有出现吗?
我测试了与单副本活动的连接,它与以下源和接收器一起工作正常
您会注意到这里我包含了完整的基本 url(没有相对 url)
HTTP 链接服务再次如下所示
当我使用这个单一副本活动时,它工作正常。
【问题讨论】:
-
复制数据是否在没有任何带有
X-AUTH-TOKENauth 标头的相对 URL 的情况下成功运行? -
好问题 Saideep,让我检查一下
-
嗨 Saideep,我刚刚更新了这个问题,我认为它回答了你的问题
-
你能确认一下吗:你想调用这个 URL
https://duedil.io/v4/company/gb/<dataset().companyId value>/financials.json -
您可以尝试将相对 URL 指定为
@concat(dataset().companyId, '/financials.json')
标签: azure azure-data-factory-2