Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS : Insert records into Parent Child table

$
0
0

Hello,

I am creating SSIS package where below mentioned is the scenario :

  1. There is sourcefiles folder -- > Need to pick CSV files of yesterday's date for processing.
  2. There are many validations which needs to be done.
  3. Store all (valid + invalid) rows in SQL destination Parent table.
  4. Store invalid rows in child table with Foreign ID of parent table.

There are around 30K to 40K rows in the CSV file.

I have created Script component to perform validations on each row. This is running very slow. Any solution to this ?

I have defined two outputs of this script task.

Also,

  1. I am not getting an idea how to get Scope identity of Parent table inserted row ?
  2. Which approach I should use to insert these rows --> Data flow, Execute SQL Task or in script component ? which one would be faster in this scenario ?
  3. Can I use Bulk Insert ?

Can anyone please help me on this ?

Thank you, Mittal.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>