简体   繁体   English

验证多个表并在ssis / BIML中复制数据?

[英]Verify multiple tables and copy data in ssis/BIML?

I have a package that have about 6 to 7 dataflow tasks.Within those dataflow tasks, I have up from 5 to 70 tasks thaht copy data from a source(ORACLE database) to a destination(sql database). 我有一个包,其中包含大约6到7个数据流任务。在这些数据流任务中,我有5到70个任务,可以将数据从源(ORACLE数据库)复制到目标(sql数据库)。 I need to make to make a count of the source table and then if the source is not empty I will copy the data .I have presently a execute sql task taht trucate all the tables.I would like to truncate if my parameters is > 0 .But wuth my use number of tables(177), I can't afford to use a variable for each one to hold the result of the count and then test the rest.Can I make something work with BIML.Can I use a stored procedure and loop throug it. 我需要对源表进行计数,然后如果源不为空,我将复制数据。我目前有一个执行sql任务,它会遍历所有表。如果我的参数> 0,我想截断但是我的表数量是多少(177),我不能为每个表使用一个变量来保存计数结果然后测试其余部分。我可以使用BIML进行某些工作吗?可以使用存储的过程并循环遍历它。 I need some advice. 我需要一些建议。

EDIT: //// 编辑:////

I think i did not explain myself correctly. 我认为我没有正确解释自己。 I have multiple dataflow task with a lot of source to destination copy.In my control flow , I have an execute sql task that truncate all my 177 tables. 我有多个数据流任务,其中有许多源到目标副本。在我的控制流中,我有一个执行sql任务,该任务会截断所有177个表。 I need to do a count on all the sources tables and store the results so i can send it to my execute sqltask.After thaht i want to check if my variable is > 0 then I would not do the task.Is there any easier way to do this than to create 177 variables. 我需要对所有源表进行计数并存储结果,以便可以将其发送到我的执行sqltask.thatha之后,我想检查我的变量是否> 0,然后我就不执行任务了。有没有更简单的方法为此,要创建177个变量。

Thanks. 谢谢。

I hope i'm not too late for you. 我希望我对你不晚。 You can use bimlonline.com to reverse engineer your package. 您可以使用bimlonline.com对您的套件进行反向工程。

Bimlonline.com is free Bimlonline.com是免费的

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

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