我在解决这个小问题时遇到了困难,希望有人能帮助我。
在我的 SSIS 包中,我有一个数据流任务。
这里发生了几种不同的转换、合并和转换。
在数据流任务结束时,有两个数据集,一个包含需要比较的两个数字,另一个数据集包含一堆记录。
理想情况下,我希望将它们传递到一个全新的数据流任务(单独的序列容器),我可以在其中对其进行一些验证工作并分离逻辑。
我一辈子都不知道该怎么做。 Iv 尝试研究脚本并将数据集存储为变量,但我不确定这是正确的方法。
下一步是将大型数据集导出为电子表格,但在此之前,我需要比较其他数据集中的两个数字并确保它们是正确的。
I'm having troubles solving this little problem, hopefully someone can help me.
In my SSIS package I have a data flow task.
There's several different transforms, merges and conversions that happen in here.
At the end of the dataflow task, there is two datasets, one that contains two numbers that need to be compared, and another dataset that contains a bunch of records.
Ideally, I would like to have these passed onto a whole new data flow task (separate sequence container) where I can do some validation work on it and separate the logic.
I cant for the life of me figure out how to do it. Iv tried looking into scripting and storing the datasets as variables, but I'm not sure this is the right way to do it.
The next step is to export the large dataset as a spreadsheet, but before this happens i need to compare the two numbers from the other dataset and ensure they're correct.
发布评论
评论(2)
要将一个数据流中的数据传递到另一个数据流,您必须有一个临时位置。
这意味着您必须将数据放入一个数据流中的目标,然后在另一个数据流中读取该数据。
您可以将数据放入多个目标中:
您可以使用相应的源组件或通过编写脚本或任何用于以下情况的原始文件 这。它们是二进制的,因此写入和读取的速度非常快。
如果您坚持使用记录集目标,请查看 http://consultingblogs.emc.com/jamiethomson/archive/2006/01/04/SSIS_3A00_-Recordsets-instead-of-raw-files.aspx 因为没有记录集源组件。
To pass data flowing in one dataflow to another, You have to have a temporary location.
This means that You have to put data in destination in one dataflow and then read that data in another dataflow.
You can put data in number of destinations:
Raw files are meant to be used for cases like this. They are binary and as such they are extremely fast to write to and read from.
In case You insist to use recordset destination take a look at http://consultingblogs.emc.com/jamiethomson/archive/2006/01/04/SSIS_3A00_-Recordsets-instead-of-raw-files.aspx because there is no recordset source component.
数据流任务需要有一个目的地;数据流任务同样不是目的地。否则数据不会到达管道中的任何地方。根据我的经验,最好的选择是:
1) 将数据泵入 SQL Server 中的临时表,然后从那里进行验证。
2) 在同一数据流任务中进行验证。
A Data Flow Task needs to have a destination; a Data Flow Task likewise is NOT a destination. Otherwise the data doesn't go anywhere in the pipeline. From my experience, your best bets are to:
1) Pump the data into staging tables in SQL Server, and then pick up the validations from there.
2) Do the validations in the same Data Flow task.