Dynamic target file names in Advanced ETL Pro

More
13 years 10 months ago #741 by Steve Vaughn
Hi,

I have a scenario where I am receiving a pipe delimited file. For purposes of this example, I am naming the file ABCTEST.txt. The file contains header records that are indicated by a '00' value in the first column. The detail records are indicated by a '01' value in the first column. The footer record is indicated by a '02' value in the first column.

The detail records will be loaded to a staging table and then processed via a stored procedure. Ultimately, these data records will process successfully or they will become error records. I am required to create a file containing the good records and a file containing the error records.

The file containing the good records must contain the header records from the original file (ABCTEST.txt) and the detail records that processed successfully. The file name for the good records must contain the original file name as part of the new file name, i.e., ABCTEST.good

The file containing the error records must also contain the header records from the original file (ABCTEST.txt) and the detail records that became error records. The file name for the error records must contain the original file name as part of the new file name, i.e., ABCTEST.err

We understand how we can load the detail records to the staging table, retrieve the good records, and retrieve the error records. We are having a hard time trying to figure out how we can create the separate files for the good records and the records in error.

My first thought was to create a transformation where I am reading the original source file, filtering on the value for the header records (’01) and writing to a text file. This works well. It creates a file with just the header records. We would then append the detail records to this file after the processing of the data. The only problem I am having is trying to maintain the original file name as part of the new .txt file I am creating/writing to via the writer in my transformation.

Is there a way to do this or do you have any suggestions

Thanks for your help!

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #742 by admin
We would need to change our ETL software to do it.
It might take up to 10 days.
I will let you know when it is ready

Mike,
DB Software Laboratory

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #743 by admin
Steve

Please give the latest version a try please and let us know the outcome

Mike,
DB Software Laboratory

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #744 by Steve Vaughn
It works when using a specific file name as well as when using a mask to read my source file.

Thanks for your support on this!!!!!!

Steve V

Please Log in or Create an account to join the conversation.