Page 1 of 1

Different Input Records to One Record layout

Posted: Mon Apr 17, 2006 5:42 pm
by vijayrc
Hi,
I have set of Various Input records that carry distinct information. e.g.,
Input type 1 would carry AC-NR,INV-NR,INV-AMT,QTY etc
Input type 2 would carry AC-NR,INV-NR,REF-NR,INV-AMT,QTY etc
Input type 3 would carry AC-NR,INV-NR,TRK-NR,INV-AMT,QTY etc
and so on and so forth.

The Output Record out of the above input records are going to be the same layout. Is there any STAGE that I can try it out that would fit this ?

Multiple Input Input Links and One Output Link. No derivations needed. All the fields that are needed for Output record comes from Input record.

Your help is much appreciated. :roll:
Thanks in advance,
Vijay

Posted: Mon Apr 17, 2006 9:36 pm
by ray.wurlod
Switch, Filter or Transformer stage to split into separate stream for each record type; Modify, Column Generator or Transformer stage to supply missing columns; Funnel stage to bring them all back together.

Posted: Tue Apr 18, 2006 1:37 am
by kumar_s
Otherwise, read the whole record as Varchar 255 and check for the delimiter ',' and replace with required characters if missing in a transformer.

Posted: Tue Apr 18, 2006 6:36 am
by vijayrc
ray.wurlod wrote:Switch, Filter or Transformer stage to split into separate stream for each record type; Modify, Column Generator or Transformer stage to supply missing columns; Funnel stage to bring them all back tog ...
Ray,
Thanks for the Input.
Correct me if I'm wrong: I have the varying Input records already in different files., so I guess the Switch,Filter/Transformer to split into separate stream for each record type isn't needed.

Output records: 150bytes of Fixed fields across all records + 100 bytes of fields based on Input record type.

[1]Available fields in Input are to be moved into select output fields[2nd half of the output record], and I guess I can use Transformer/Modify[!?] to do so.

[2] the remaining output fields are the first few hundred bytes of all output record. So is there a way I can built this reference record[1st few hundred bytes] and JOIN this with the 2nd half of the record from step#1
[3] OR for the remaining output fields, I may have to do a lookup against a reference file, as these are common across output records.

and FUNNEL all different outputs into one single output.

Thanks again

Posted: Tue Apr 18, 2006 8:19 am
by kumar_s
If input files are from different link, use transformer or modify stage to add the buffer field and use funnel to consolidate all.