Azure数据工厂检查复制记录的行数 [英] Azure Data Factory check rowcount of copied records

查看:56
本文介绍了Azure数据工厂检查复制记录的行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个ADF管道,该管道会将SQL表中的行复制到Azure Data Lake中的文件夹.之后,应删除SQL中的行.但是对于此删除操作,我想知道复制的行数是否与在管道开头选择的行数相同. 有没有一种方法可以获取复制操作的行数,并将其用于其他操作(如查找)

I am designing a ADF pipeline that copies rows from a SQL table to a folder in Azure Data Lake. After that the rows in SQL should be deleted. But for this delete action takes place I want to know if the number rows that are copied are the same as the number of rows that were I selected in the beginning of the pipeline. Is there a way to get the rowcount fo the copy action and use this in another action (like a lookup)

编辑后续问题: 薄晓的回答还可以.然后我有一个后续问题.复制活动之后,我将If条件添加以下表达式:

Edit follow up question: Bo Xiao's answer is OK. BUt then I have a follow up question. After the copy-activity I put an If Condition with the following expression:

@activity('LookUpActivity').output.firstRow.RecordsRead ==      @{activity('copyActivity').output.rowsCopied

但是随后出现错误:@activity('LookUpActivity').output.firstRow.RecordsRead == @ {activity('copyActivity').output.rowsCopied

But then I get the error: @activity('LookUpActivity').output.firstRow.RecordsRead == @{activity('copyActivity').output.rowsCopied

是否可以比较两个活动的输出参数以查看这是否为真?

Isn't it possible to compare output parameters of two activities to see if this is True?

额外我在这段代码中发现了一个错误.我在代码开头忘记了"{".但是然后代码仍然是错误的.要比较早期活动的两个输出,代码必须为:

extra edit: I just found an error in this piece of code. I forgot a "{" at the begin of the code. But then the code is still wrong. To compare two outputs from earlier activities the code must be:

@equals(activity('LookUpActivity').output.firstRow.RecordsRead,activity('copyActivity').output.rowsCopied)

推荐答案

您可以在活动输出

您可以使用如下输出值:

And you can use the output value like this:

@activity('copyActivity').output.rowsCopied

这篇关于Azure数据工厂检查复制记录的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆