ssis 中的参数绑定 [英] Parameter bindings in ssis

查看:40
本文介绍了ssis 中的参数绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用执行包任务动态地将值传递给子包变量?

How to dynamically pass value to the child package variable by using Execute Package Task?

我需要同时从另一个包(父)调用一个包(子).在每次调用中,我需要将不同的值传递给子包变量

I need to call a package(child) from another package (parent) concurrently. In every call, I require to pass different value to child package variable

我曾尝试在执行包任务中使用参数绑定,但在某些地方我犯了错误.它没有按预期传递价值.只传空

I have tried using parameter bindings in Execute Package Task but, some where I made mistake. Its not passing value as expected. Passing only empty

例如:

一位家长和一位孩子.3个不同的任务来运行同一个孩子.我想将 3 个不同的变量从父变量传递给单个子变量

one parent and one child. 3 different tasks to run same child. I want to pass 3 different variables from parent to a single child variable

提前致谢

推荐答案

要将变量从父包传递到子包,您可以使用包配置.

To pass a variable from a parent package to a child package, you can use Package Configurations.

在您的父包中,创建要从中传递值的变量.我们称之为varParent.现在,使用执行包任务来引用子包.您不需要任何参数绑定.

In your parent package, create the variable you want to pass the value from. Let's call it varParent. Now, use an Execute Package Task to reference the child package. You don't need any parameter bindings.

在您的子包中,创建将从父包接收值的变量 - varChild.右键单击控制流中的空白区域并选择属性.滚动到杂项"下的配置.然后点击带有三个点的按钮.

In your child package, create the variable that will receive the value from the parent package - varChild. Right click on an empty space in the Control Flow and select Properties. Scroll to Configurations under Misc. and click the button with the three dots.

选中启用包配置"并单击添加".包配置向导打开.点击下一步.在配置类型中,选择父包变量.在父变量字段中,输入 varParent.点击下一步.

Check "Enable package configurations" and click Add. The Package Configuration Wizard opens. Click Next. In Configuration type, select Parent package variable. In the Parent variable field, enter varParent. Click Next.

在显示的树视图文件夹结构中,展开变量、varChild、属性并选择.点击下一步.

In the tree view folder structure that shows, expand Variables, varChild, Properties and select Value. Click Next.

为您的配置命名并单击完成.关闭包配置管理器.

Give your Configuration a name and click Finish. Close the Package Configurations Organizer.

现在,您 varChild 将从 varParent 获取值.

Now, you varChild will get the value from varParent.

这篇关于ssis 中的参数绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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