SSIS : Using multicast to enter data into 2 RELATED destinations

前端 未结 4 504
攒了一身酷
攒了一身酷 2021-01-13 20:46

I am new to SSIS. I have data coming from a single source. I need to enter that data into several tables (these tables are related by foreign key relationships). I am usi

4条回答
  •  难免孤独
    2021-01-13 21:33

    The short answer is that, out of the box, SSIS isn't built for that. Once you land data in a table, the destination components don't allow for an output stream to be sent.

    You could fake this behaviour out by using an OLE DB Command but your performance will be less than good since it will issue a singleton insert statement for every row that flows through the data flow. Generally, the engine attempts to batch N units of work up and perform bulk, set-based operations on the data to get more throughput. You could also use a Script Component to perform this. The same performance caveat would still apply.

    A better option might be to land your data into a staging table and then use an Execute SQL Task after your Data flow and use the OUTPUT clause of the INSERT operation to capture those identities and then patch them into your other table.

提交回复
热议问题