Problem witht the join 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
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Problem witht the join stage

Post by sshettar »

Hi All,

Well i have this job where i am joining 4 different files at different stages.

well the first two files are joined perfectly and i use this output file to join with the 3rd file . here i am haveing a problem . well i have this one field in the 3rd file which has values but after i join this file with the output of the first join i'm not getting any values for this field . it just appears as blank . i dunno if it is taking null or it is spaces.
but this is not the right output as this field should get values.
well this field CTN_CONFIG_NUM_FREE_FLOAT is of type varchar and length 8
and i 'm joining based on one field which is called Offer_id.
Any clue as to where i'm goin wrong


Thanks in advance
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Make sure you are having a match on the 'key' fields, if there is 'no match' then you will get 'null' values. Also check for spaces in your 'key' field.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

Well there are matching records , that is why the other fields are displaying values . only this field is not displaying values.

Any Clue why this is happening ?
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

field CTN_CONFIG_NUM_FREE_FLOAT is of type varchar and length 8
Have you made any changes to the Data-Type or Length of this field. Also post some sample data.
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

No i havent changed the data type nor the length . it is the same as what it is in the source file.

well the sample data at the source is here below
Promo_ID Offer_ID Buy_Cart Get_Cart CTN_CONFIG_NUM_DEALS CTN_CONFIG_NUM_FREE_FLOAT
00003453 00005263 1 1 0 0
00003507 00005320 0 1 5 0
00003549 00005344 1 1 0 0

Well at the output all the above fields are displaying its value but for the last field ie CTN_CONFIG_NUM_FREE_FLOAT which appears blank .

is this information enough ?

plz need help on this


Thanks in advance
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

How are you sorting and partitioning the data?
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

i'm doin a hash partinoning and the key fieldfs are the same as the keys used to join the two files.

ie the Offer_Id
and Promo_Id
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Were the data been joined based on the key? what is the job desing? What is the stage right after Join stage? Is it 0 or blank?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
sshettar
Premium Member
Premium Member
Posts: 264
Joined: Thu Nov 30, 2006 10:37 am

Post by sshettar »

well the job design is as follows
i need to join 4 files
the first join is between the files
Kit_Param and Offer_Pcking
this join is done based on the keys Offer_Id and Promo_Id
here i'm getting few fields from the Kit_Param file and few from Offer_Pcking file

the key columns are mapped from the offer_Pcking file


now the output of this file has to be joined with the offer file
based on the same two key columns
and here again i'm getting all the fields from the output file and few from the offer file.
the problem is with the field from the offer file which is not getting displayed.
it is blank . its not showing any data

i guess i'm clear now?

Thanks in advance
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

It shows that you data is not joined based on the given key columns. Not sure if you are the one who created the other post for unsucessfull join in Join stage. There are factors like, Sorting order, Partition, data type.... Pls do a search. If you feel that you have mentioned all parameters correctly, list those setting here. Ensure you have the correct data for join.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
vivekreddy
Participant
Posts: 43
Joined: Mon Jan 15, 2007 10:53 pm

Post by vivekreddy »

Sort the data in both input sets to the join stage(s) on the join key(s) before sending it to the join stage(s). And before sorting the respective data sets, clear the partitioning applied in the immediately preceding stage (s).
I had the same problem, and this worked for me.
Please let me know whether this works for u as well.
Regards,
Vivek D. Reddy

__________________________________________
If knowledge can create problems, it is not through ignorance that we can solve them. - Isaac Asimov
Post Reply