First, if the metadata is different. It does not work with union all .
So,
Why not just have 3 dataflow tasks one for each table with precedence constraints to have them execute in the correct order. Each destination would use its own connection manager but they would all point to the same flat file. The only thing you would need to do is in the flat file destination property grid (or advanced editor) make sure you set the overwrite flag to false for the second and third dataflows so that the file will be appended to. I tested this and it worked fine for me.
Dataflow 1:
OLEDB Src (header table) --> FlatFile Dest (using flat file conn mgr 1 (filename = combined.csv), overwrite set to true)
Dataflow 2:
OLEDB Src (details table) --> FlatFile Dest (using flat file conn mgr 2 (filename = combined.csv), overwrite set to false)
Dataflow 3:
OLEDB Src (trailer table) --> FlatFile Dest (using flat file conn mgr 3 (filename = combined.csv), overwrite set to false)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7899089/viewspace-732601/
,如需转载,请注明出处,否则将追究法律责任。