record propagation

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
brego
Participant
Posts: 2
Joined: Sat Nov 11, 2006 3:25 am

record propagation

Post by brego »

Hi folks!

Sorry for my bad English ;)

I have problem with record propagation. I'm newbie in DStage, and couldn't solve it on my own, so I'm asking for your help.

I'm working on a flat file that looks like this:

id|number|range_beginning|range_end
1| 123450| 123451|123459
2| 123460| 123461|123469

What i need to do, is divide those records by they range, and make multiple values for "number", like this:

id|number|range_beginning|range_end
1| 123450| 123451|123459
1| 123451| 123451|123459
1| 123452| 123451|123459
...
1|123459| 123451|123459

Which stage I need to use, to make this work?

PS>
I'm using a FTP Enterprise stage to read data from txt file. After that there is an Transformer stage for basic type convertion, and an Oracle Enterprise stage that writes data to the database.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Welcome Aboard :)
You need to read each record as a single column and depending upon the range, duplicate them. You need to write your own routine to do this. Roy has a great FAQ entry on how to generate rows with a single row. Check here.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
brego
Participant
Posts: 2
Joined: Sat Nov 11, 2006 3:25 am

Post by brego »

Thank you for your answer!

I think i didin't make my self clear with explenation of the problem :oops: . The target place for data stream is a data base, not flat file. I need to split rows to multiple values after extract from flat file, and before INSERT into table.

I try to use Make Subrecord stage, but without any result.
Any suggestion will be appreciated.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It does not matter what the target is. You can also stage your output to a flat file and then from there load to your database. It does not matter.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply