简体   繁体   English

Azure 数据工厂:我的 REST api 调用在复制数据中有效,但在数据流中无效,为什么?

[英]Azure datafactory: My REST api call works in copy data but not in data flow, why?

I am trying to set up a data pipeline in ADF.我正在尝试在 ADF 中设置数据管道。 I can't seem to figure out why an API call works as a source in the "copy data" block in the pipeline, but when I try to use it as a source in the data flow it throws an error.我似乎无法弄清楚为什么 API 调用在管道中的“复制数据”块中用作源,但是当我尝试将其用作数据流中的源时,它会引发错误。

This is the request in the copy data block: https://i.stack.imgur.com/9wzSZ.png'这是复制数据块中的请求: https://i.stack.imgur.com/9wzSZ.png'

This is the request in the data flow tab: : https://i.stack.imgur.com/Onpuk.png这是数据流选项卡中的请求:: https://i.stack.imgur.com/Onpuk.png

And this is the error I get: https://i.stack.imgur.com/f9zdb.png这是我得到的错误: https://i.stack.imgur.com/f9zdb.png

The request body should be the same.请求正文应该相同。 Still I get a good response when I preview the data in the copy block: https://i.stack.imgur.com/cKZsb.png当我预览复制块中的数据时,我仍然得到了很好的响应: https://i.stack.imgur.com/cKZsb.png

Is there some setting that is different that I am missing?是否有一些我错过的不同设置?

EDIT: the url for the request is https://www.daggegevens.knmi.nl/klimatologie/uurgegevens with the request body start=2022010101&end=2022090724&stns=330&vars=DD:FH:FF:FX&fmt=json EDIT: the url for the request is https://www.daggegevens.knmi.nl/klimatologie/uurgegevens with the request body start=2022010101&end=2022090724&stns=330&vars=DD:FH:FF:FX&fmt=json

I have reproduced same error in Dataflow.我在 Dataflow 中重现了相同的错误。

错误

  • I tried to give Response body in query parameters as in below image我试图在查询参数中给出响应正文,如下图所示

查询参数

  • Response of this API had header and body in each line item.此 API 的响应在每个行项目中都有 header 和正文。回复
  • Thus, select transformation is used to select only the body response and copied it to the sink因此, select 转换用于 select 仅主体响应并将其复制到接收器选择转换

Outputs that I received from both copy activity and data flow activity are same.我从复制活动和数据流活动收到的输出是相同的。

copy activity output复制活动 output复制活动输出

data flow activity output数据流活动 output数据流活动输出

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM