Page 1 of 1

Help needed with job design

Posted: Wed Sep 09, 2009 1:58 am
by Marcus426
Hi all,

Newbie here.
Can you guys please help me out with a job design. Here are the details.

I have a fixed length file containing a lot of headers(journal) and details(journal). The header records are distinguished from the detail by a column( Has 'A' for header, blank for detail). I have to do a lookup on this file and based on the lookup have to do some transformations separately on the header and the detail and again load them to a same file. Can anyone please tell me the logic of how to achieve this( seperate transformations on header & detail). Sorry, if this is too simple of a question.

Posted: Wed Sep 09, 2009 2:07 am
by ArndW
Let's assume you have a file:

Code: Select all

Header1
Detail1.1
Detail1.2
Header2
Detail2.1
Detail2.2
Detail2.3
[code]

What sort of a lookup do you need to do, i.e. does Detail2.2 need to look at Header1?

Posted: Wed Sep 09, 2009 2:18 am
by Marcus426
Arndw,

sorry for the confusion.


The lookup altogether is against a different file based on key columns common to both headers and details. I need to do transformations separately on all headers (header1, header2.....) and all details (detail1.1,detail1.2..........) and load them to target in the same order as source file. please let me know if I am still confusing.

Posted: Wed Sep 09, 2009 2:32 am
by Sainath.Srinivasan
What you have provided is full flow with no detail. It leaves lots of questions like
1.) What column in source is used to fetch data?
2.) What value in the reference must match and what is returned ?
3.) Must that happen for all rows or only on specific condition?

Maybe you can try to work on it and provide the bits you find difficult.

Posted: Wed Sep 09, 2009 3:42 am
by Grace J.
As per my understanding of your requirement,,,

If you have seperate key columns in both source and reference files, you can do lookup based on that key columns and then in a transformer you can check for the column (which seperates header and details) . If that column equals A, then do calculation for header else do calculation for detail.

I hope you will get the records in same order as output. If not sort the records after source and preserve the sort order till the output stage