简体   繁体   English

如何使用 REST API 作为 Azure 数据工厂中查找活动的来源

[英]How to use REST API as source for Lookup activity in Azure Data Factory

I am trying to incrementally load data from a ServiceNow data source into an Azure SQL table as per the guide from Microsoft https://learn.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-portal .我正在尝试按照 Microsoft https 的指南将数据从 ServiceNow 数据源增量加载到 Azure SQL 表中://learn.microsoft.com/en-us/azure/data-factory/tutorial-incremental-copy-portal . This uses 2 lookup activities to find 2 dates, I then filter the source data in the copy activity to only return and insert rows where the sys_updated_on date is between the 2 lookup values.这使用 2 个查找活动来查找 2 个日期,然后我过滤复制活动中的源数据以仅返回和插入 sys_updated_on 日期在 2 个查找值之间的行。

I would now like to lookup a value from a REST API dataset.我现在想从 REST API 数据集中查找一个值。 However, I do not get the option to choose my REST dataset in the lookup activity.但是,我无法在查找活动中选择我的 REST 数据集。 It just does not appear as an option.它只是不作为一个选项出现。 The REST URL is setup to return me one date value which I need to pass into the WHERE clause of my source in the copy data. REST URL 设置为返回一个日期值,我需要将其传递到副本数据中源的 WHERE 子句中。 If I cannot retrieve this value in the lookup, how else can I pass it to my WHERE clause?如果我无法在查找中检索到该值,我还能如何将它传递给我的 WHERE 子句?

Currently I use activity('LookupOldWaterMarkActivity').output.firstRow.watermarkvalue and convertTimeZone(activity('LookupNewWaterMarkActivity').output.firstRow.watermarkvalue目前我使用 activity('LookupOldWaterMarkActivity').output.firstRow.watermarkvalue 和 convertTimeZone(activity('LookupNewWaterMarkActivity').output.firstRow.watermarkvalue

Thanks谢谢

As per the Microsoft official document, the Rest dataset is supported in lookup activity.根据 Microsoft 官方文档,查找活动支持Rest数据集。

You can post feedback from an Azure Data factory or raise a support request for fixing the issue.您可以通过 Azure 数据工厂发布反馈或提出支持请求以解决问题。

在此处输入图像描述

As a workaround, you can create an HTTP dataset with JSON format and use the output value in later activities.作为解决方法,您可以创建一个HTTP格式的 HTTP 数据集,并在以后的活动中使用 output 值。

在此处输入图像描述

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

相关问题 Azure 数据工厂 - 复制活动 - 休息 api 集合参考 - Azure Data Factory - Copy Activity - rest api collection reference 如何在 Azure 数据工厂中使用这个 Rest API - How can I consume this Rest API in Azure Data Factory 如何使用 Azure 数据工厂管道调用 REST API? - How to call a REST API using Azure Data Factory Pipelines? 如何在 Azure 数据工厂中使用此 API - How can I use this API in Azure Data Factory 我正在尝试通过 azure 数据工厂将数据从 REST API 下载到 azure 数据湖。 如何在 azure 数据工厂中传递 API 的查询参数? - I am trying to download data from REST API to azure data lake via azure data factory. How can I pass query parameters for API in azure data factory? 使用 Azure 数据工厂从 REST API 获取数据 - Using Azure Data Factory to get data from a REST API 使用 Azure 数据工厂从 REST API 引入传入数据 - Using Azure Data Factory to ingest incoming data from a REST API 如何使用Data Factory v2将数据从REST API终结点复制到Azure DB? - How do I copy data from REST API endpoint into Azure DB using Data Factory v2? Azure 数据工厂递增 REST 中的数字 API 请求正文 - Azure Data Factory Incrementing a Number in REST API Request Body Azure 数据工厂 REST API 返回无效 JSON 分页文件 - Azure Data Factory REST API return invalid JSON file with pagination
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM