Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing precedence in a Data Flow 1

Status
Not open for further replies.

Peager

Programmer
May 27, 2003
140
US
I have a dataflow that reads a flat file, does a fair bit of manipulation, and writes the data into two SQL tables, one of which is are header records and the other detail lines related to those headers.

The Header and Detail tables are set up with relational integrity. The problem I'm having is that, no matter what I try, the dataflow wants to create the Detail records before the Header records.

Is there any way to force precedence in the dataflow to have the header records created first? I can see how to force precedence in task flows but not data flows.

Much thanks in advance....

Paul

 
You need to create two different data flow tasks. The first one will have the connection to the source, do all the data manipulations and then load data to the header table.

The 2nd data flow task will load data to the detail table.
If required you will have to repeat the same data manipulations in the 2nd data flow task also.. Of course the 2nd data flow task will have the same source, and destination will be the detail table.

You will have the precedence constraints between the 1st and 2nd DFTs

 
I was afraid that would be the solution.

Thanks.

Paul
 
you can replace the detail destination with a RAW file. Then create the second data flow that reads the raw file and dumps straight into the detail table without having to redo any of the transforms.
 
Hmmmmmm I like that solution better than processing the original data twice. I'll look into it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top