ssis包 [英] ssis package

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

问题描述

您好,

我有不同状态的不同表。文件名只是各自的状态。在我的目的地,额外的列就在那里。我需要捕获文件名,即状态并加载到额外列。

i have different tables for different states.file name is respective state only. In my destination extra column is there. my need is capture the filename i.e, state and loaded into extra column.

假设我加载达拉斯状态文件,达拉斯文件中的所有记录都将达拉斯视为状态。

For suppose if i load Dallas state file,all the records in Dallas file get Dallas as state.

请有人告诉我这件事。

谢谢。

推荐答案

您的所有文件是否都要复制到您要从中选择和处理它们的公共文件路径。

Are all your files copied to a common file path from where you want to pick and process them.

您可以使用For Each循环任务和For Each File Enumerator来读取文件及其名称。

You could use the For Each Loop Task with a For Each File Enumerator to read the files along with their names.

创建一个用户名变量来保存名称。例如 - FileNames。

Create a user variable to hold the name. For Example - FileNames.

选择"仅限名称"。选项如下所示。

Choose the "Name only" option as shown below.

从Variable Mappings将用户变量映射到索引0,如下所示。

From the Variable Mappings map the user variable to index 0 as shown below.

现在可以使用此变量用状态信息填充额外列。

You can now use this variable to populate the extra column with state information.

请告诉我如果还有其他问题。

Please let me know if there are any further questions.

-



如果上面的答案很有帮助,点击"标记为答案"和"向上投票",这可能对阅读此主题的其他社区成员有益。



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

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