使用ADF读取分页的API数据的问题

发布于 2025-02-07 02:35:11 字数 338 浏览 2 评论 0原文

我正在尝试使用ADF复制活动从分页API中读取数据。在第一次访问API时,仅使用基本URL(没有任何查询参数)。当API返回数据时,它将具有带有一些令牌的键称为光标。必须将其作为查询字符串传递才能获取下一页。如何使用ADF实施此操作?如何在基本URL中附加“ ?cursor = ”,然后从API响应中添加光标值

第一页:{{base url}}#return with json带有键称为光标
从第二页:{{base url}}?cursor = {{json响应中的光标键的值}}}}}}}}}}}}}}}}}}}}

在分页的复制活动中使用了查询参数。但是它不起作用

I am trying to read the data from a paginated API using ADF copy activity. While accessing the API at first time, only the base URL is used(without any query params). When API returns the data, it will have a key called cursor with some token. This has to be passed as query string to get the next page. How to implement this using ADF?. How to append "?cursor=" in the base URL and then add cursor value from API response

First Page : {{Base URL}} #returns a JSON with a key called cursor
From Second Page : {{Base URL}}?cursor = {{value of cursor key in JSON Response}}

I have tried using Query Parameters inside the Copy Activity of pagination. But it is not working

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少跟Wǒ拽 2025-02-14 02:35:12

您可以将Web活动用于光标值,并将其传递给复制活动中的相对URL。

  1. 您可以使用Web活动首先使用基本URL呼叫。

  1. 参数化数据集中的相对URL。

  1. 将Web活动连接以复制数据活动,并将Web活动输出传递到复制活动数据集参数,以使用光标值运行URL。

例如:@concat('?cursor =',activity('web1')。output.cursor)

“

You can use web activity to the cursor value and pass it to the relative URL in copy activity.

  1. You can first make a call with the base URL using web activity.

enter image description here

  1. Parameterize the relative URL in the dataset.

enter image description here

  1. Connect web activity to copy data activity and pass the web activity output required value to the copy activity dataset parameters to run the URL with cursor value.

Ex: @concat('?cursor=',activity('Web1').output.cursor)

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文