Different Input Records to One Record layout

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Different Input Records to One Record layout

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
vijayrc
Participant
Posts: 197
Joined: Sun Apr 02, 2006 10:31 am
Location: NJ

Post 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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply