Mohibab Ответов: 0

Заголовок и подробная запись в ssis


This is related to Dataflow task in SSIS. 

I have developed a DFT to process a ragged flat file with header and detail records.  

2 different tables to store header(Invoice_header) and  detail record(Invoice_lines).  These 2 tables are connected with Foreign key relationship and the primary keys are from header record.  

All are working perfectly fine with script task and there are 2 flow of records, one for header and another for detail. 
Header record is first processed and loaded to Invoice_header table and then Invoice_line table is updated with detail record.  Now the problem is when there is primary key violation in Invoice_header table, the processing stops for header record but detail records are loaded successfully which is not expected. 

My requirement is to stop the whole processing when there is any issue in updating the header record that has primary key violation or any issue for that matter.

<pre>**File Layout:**
----------------
HDR;SJCSYD;5999920;ACWFNTFLT;08/02/2017;AUD; 112483.26;0;0;
2020700242;SND;DT; 356.13;
2020700242;SND;TL; 194.00;
2020700489;SND;DT; 5503.35;
2020700489;SND;TL; 194.00;
HDR;SJCSYD;5999920;ACWFNTFPJ;08/02/2017;AUD; 1242.20;0;0;
6220704503;SND;TL; 83.00;
6220704920;SND;TL; 185.00;
6420700758;SND;TL; 185.00;
6420700761;SND;TL; 83.00;

**DFT:**
------
Flat file source --> Script task --> ole destination 1 for header record --> old destination 2 for detail record. 

Please let me know if you need any further details. 



Что я уже пробовал:

Я создал DFT, и у меня есть проблема с управлением потоком dft.

0 Ответов