且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Azure Data Factory v2中运行SQL脚本?

更新时间:2023-02-07 07:38:29

我同意SSIS缺少诸如执行SQL任务"之类的东西.我通常使用"LookUp"活动,因为我不喜欢为简单任务创建过程,而这些过程可能是一个单行命令.查找活动的唯一限制是它需要某种输出结果集.因此,当我需要运行更新语句时,我会做的事情是这样的:

I agree that the absence of something like "Execute SQL task" is SSIS is bumming. I normally use a "LookUp" activity as I don't like to create procedures for simple tasks which could be a one line command. The only constraint of lookup activity is that it needs some sort of output result set. So what I do when I need to run an update statement is something like this:

伪查询select 0 id将数据馈送"到Lookup活动,因此它能够在数据库上运行命令集.

The dummy query select 0 id "feeds" the data to the Lookup activity and thus it is able to run the command set on database.