replacement for lookup stage

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
kirankota79
Premium Member
Premium Member
Posts: 315
Joined: Tue Oct 31, 2006 3:38 pm

replacement for lookup stage

Post by kirankota79 »

i want to replace the values of 4 columns with other values......so iam using the original file as input to the lookupstage and the new values sequential file as a lookup file to the lookup stage. the file has 10million records. Datastage job is aborting saying that the space is not sufficient. i understand that since it has millions of records ......lookup stage dont allow it. but can anybody tell me the replacement for it...so that i can proceed...


thanks in advance......
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

Join Stage
kirankota79
Premium Member
Premium Member
Posts: 315
Joined: Tue Oct 31, 2006 3:38 pm

Post by kirankota79 »

i want to be more clear......what iam doing is a swap technique. i want to swap the 4 collumns. for example.....the values of columns at row 1 should be swapped with the values of columns at row 100.
I have generated some random rownumbers with a C++ routine equal to the number of the records in the file. for example:
1 1990
2 3028
3 56
4 898...........etc. so the values at row 1 should be swapped with row 1990 and so on.............



i dont think the join stage can do this? Am i right.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Use the transformer, re-arrange the columns. No join is required in this case.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You need to define a primary key so that a row can be found in a reference. Lookup, Join, Merge, heck even a database join, require you to identify how to connect rows. If you mean data is positional within the data file, then simply use the row number as the primary key and create a column to hold that value.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Do a join based on first column in the Left file and second column as key in right file. Make sure you rename the columns and datatypes to be identical.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I must be missing something here. If the columns within a single row are to be re-arranged, no join is required. Just re-arrange them in the transformer. Right :?:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Different rows.
the values of columns at row 1 should be swapped with the values of columns at row 100.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

kumar_s wrote:Different rows.
the values of columns at row 1 should be swapped with the values of columns at row 100.
Thank you Kumar. I should just shutup today. Sorry guys. :oops:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

May be you can just start. :wink:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply