Generate repeated values in target table

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
Amarpreet
Participant
Posts: 20
Joined: Tue Apr 04, 2006 11:45 pm
Location: India
Contact:

Generate repeated values in target table

Post by Amarpreet »

I have a scenario wherein I have some 2000 records in target table. There is one source table in which only one field is there (say 10 random values). There is no joiing condiiton between these tables. I have to poplulate one of my taget columns with this source field and have to run the job as many values are there in source. In the end I should have 2000*10 records in my target table. 2000 records will repeat for each value of the source field. and that value I have to populate in one of my target columns.
How can I do this?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Search for Cartesian product or join.
Create a dummy column say with a value of 1. In both the tables if possible. And make a join betweent the two table on the dummy column during run time. Or do a lookup on the column. Which will force the cartecial product.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply