Page 1 of 1

record propagation

Posted: Wed May 30, 2007 8:49 am
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.

Posted: Wed May 30, 2007 9:16 am
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.

Posted: Thu May 31, 2007 7:59 am
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.

Posted: Thu May 31, 2007 8:00 am
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.