如何在Azure Data Factory v2中运行SQL脚本? [英] How to run SQL Script in Azure Data Factory v2?
问题描述
Azure数据工厂V2中没有SQL脚本活动.那么,如何在数据库中创建存储的proc模式呢?我有什么选择?
There is NO Sql Script activity in Azure Data Factory V2. So how can I create a stored proc, a schema in a database? What are my options?
推荐答案
我同意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.
这篇关于如何在Azure Data Factory v2中运行SQL脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!