简体   繁体   English

SQL任务之后的SSIS文件系统任务

[英]SSIS File System Task after SQL task

I have one Execute SQL Task (DOE Params) with script: 我有一个带有脚本的Execute SQL Task(DOE参数):

select 
    SystemCode
    ,[Group]
    ,Process
    ,InputFolder
    ,InputFileName
    ,TargetFileName
from rpt.v_cfg_Report_DOE_Parameters 
where 
Report_Id = ? 
and Procedure_Id = ?

And after there is new sql task (RUN DOE CALLER) which taking results from previous query, call procedure, which continue to process data for some another steps. 在出现新的sql任务(RUN DOE CALLER)之后,该任务从先前的查询,调用过程中获取结果,并继续为其他步骤处理数据。 I need to make File System Task which will copy that params from (GET DOE Params) to file and to save that file in folder where I can see which parameters are forwarded to procedure in a purpose of check. 我需要执行“文件系统任务”,该任务会将参数从(“获取DOE参数”)复制到文件中,并将该文件保存在文件夹中,在该文件夹中,我可以查看出于检查目的将哪些参数转发给过程。

Any idea how to do that? 任何想法如何做到这一点?

You can use the result set from that query to an object variable. 您可以将查询中的结果集用于对象变量。 Then use a for each loop container set to ado.net iterator. 然后对设置为ado.net迭代器的每个循环容器使用a。 This allows you to set the parameters to package variables for each time through. 这使您可以设置参数以打包每次的变量。 Those then drive the file system task. 然后,它们驱动文件系统任务。 You could also use that query in a source component rather than a sql task. 您还可以在源组件而不是sql任务中使用该查询。 In the data flow you choose a recordset destination that points to the object variable. 在数据流中,选择一个指向对象变量的记录集目标。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM