简体   繁体   English

将包参数传递给执行包任务

[英]Pass package parameters to Execute Package Task

I'm using BIML to generate a coordination package that will execute multiple SSIS packages (some parallel and some linear). 我正在使用BIML生成一个协调包,它将执行多个SSIS包(一些是并行的,一些是线性的)。 (I'm using VS2012 and the SSIS project deployment model) (我正在使用VS2012和SSIS项目部署模型)

With the code below I can generate two dummy Execute Package Tasks : 使用下面的代码,我可以生成两个虚拟执行包任务

<Biml xmlns="http://schemas.varigence.com/biml.xsd">
  <Packages>
   <Package ConstraintMode="Linear" AutoCreateConfigurationsType="None" ProtectionLevel="DontSaveSensitive" Name="Coordination">     
   <Parameters>
     <Parameter Name="param1" DataType="Int64" IsRequired="true" IsSensitive="false">1</Parameter>        
   </Parameters>
   <Tasks>
     <Container Name="SEQ container" ConstraintMode="Parallel"> 
       <Tasks>
         <ExecutePackage Name="Run Package1">  
           <ExternalProjectPackage Package="Package1.dtsx" />
         </ExecutePackage>
         <ExecutePackage Name="Run Package2">  
           <ExternalProjectPackage Package="Package2.dtsx" />
         </ExecutePackage>
       </Tasks>
     </Container>
   </Tasks>
  </Package>
 </Packages>
</Biml>

BIDS Helper with generate the coordination package without any errors. BIDS Helper生成协调包,没有任何错误。

The next step in completing the coordination package is using a package parameter to control the executed packages. 完成协调包的下一步是使用package参数来控制已执行的包。 I don't see any way to pass the parameter "param1". 我没有看到任何传递参数“param1”的方法。

Is there any way to pass the parameter in BIML? 有没有办法在BIML中传递参数? (in the Execute SQL task I see this option, but not here) (在执行SQL任务中,我看到此选项,但不在此处)

UPDATE: There is a new version of BIDSHelper with the right support for project parameters...-> http://bidshelper.codeplex.com/releases/view/112755 更新:有一个新版本的BIDSHelper,对项目参数有正确的支持......-> http://bidshelper.codeplex.com/releases/view/112755

Those options have been added to the latest builds of BIDSHelper, which will be shipping in the next two weeks. 这些选项已被添加到BIDSHelper的最新版本中,该版本将在未来两周内发布。 If you email support@varigence.com, we can send you a pre-release, if you'd like. 如果您发送电子邮件至support@varigence.com,我们可以向您发送预发布,如果您愿意的话。 The syntax is: 语法是:

<Biml xmlns="http://schemas.varigence.com/biml.xsd">
    <Packages>
        <Package ConstraintMode="Linear" AutoCreateConfigurationsType="None" ProtectionLevel="DontSaveSensitive" Name="Coordination">
            <Parameters>
                <Parameter Name="param1" DataType="Int64" IsRequired="true" IsSensitive="false">1</Parameter>
            </Parameters>
            <Tasks>
                <Container Name="SEQ container" ConstraintMode="Parallel">
                    <Tasks>
                        <ExecutePackage Name="Run Package1">
                            <ExternalProjectPackage Package="Package1.dtsx" />
                            <ParameterBindings>
                                <ParameterBinding Name="Param1" VariableName="System.PackageID" />
                            </ParameterBindings>
                        </ExecutePackage>
                        <ExecutePackage Name="Run Package2">
                            <ExternalProjectPackage Package="Package2.dtsx" />
                            <ParameterBindings>
                                <ParameterBinding Name="Param1" VariableName="System.PackageID" />
                            </ParameterBindings>
                        </ExecutePackage>
                    </Tasks>
                </Container>
            </Tasks>
        </Package>
    </Packages>
</Biml>

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

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