Data is getting rejected at lookup.

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
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Data is getting rejected at lookup.

Post by ambasta »

Hi,
I am performing a job from file to Repository,I am doing lookup from one table as the target is having referencital integrity on it.Suppose I am getting data (1 --one followed by three space)from source file..i m trimming and sending it to the lookup stage where this data is getting rejected and reason it is giving that this data doesnot exist in lookup table,but required data(i.e. 1) is there in lookup table.when I am loding the meta data in extended column it is showing unicode. Actual length is (varchar[4]) but when I m loding metadata it is coming as (varchar[16]). is the problem due to unicode character????Is there any way out???please help me.


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

Post by kumar_s »

Search the forum, you can find a post in the same regards.
If you were not able to convert the lookup data, convert the input stream according to the lookup, you have ustring_from_string functon avaialble in transformer.
If its Char, I usually prefer to convert it into Varchar. You can edit the data length as well using transformer.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

When ever I import metadata where datatypes are CHAR, I uncheck the unidata option and that works for me. It might work for you as well. Also, when you are trimming the data and sending it to Lookup stage, what is the datatype of that column in the Lookup stage?
Kris

Where's the "Any" key?-Homer Simpson
ambasta
Participant
Posts: 93
Joined: Thu Jan 19, 2006 10:29 pm
Location: Bangalore

Post by ambasta »

kris007 wrote:When ever I import metadata where datatypes are CHAR, I uncheck the unidata option and that works for me. It might work for you as well. Also, when you are trimming the data and sending it to Lookup stage, what is the datatype of that column in the Lookup stage?
From Source Char(4) is Coming and i m doing lookup based on column having datatype varchar(16)[unicode]
ambasta
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Post by Nageshsunkoji »

Kunal,

If you are performing lookup CHAR to VARCHAR, you will not get exact result. So, first convert u r source from Char to Varchar. We faced lot of issues, while performing lookup CHAR with VARCHAR. Solution is make the both fields to Varchar and perform lookup. I think u will get the result.
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

ambasta wrote: i m trimming and sending it to the lookup stage where this data is getting rejected and reason it is giving that this data doesnot exist in lookup table
If you are trimming your source data and then again sending it as a CHAR to LookUp Stage then it wont help because the spaces are added back again to your data. As suggested, you will need to change it to Varchar while trimming it and then you will be OK.
ambasta wrote:
From Source Char(4) is Coming and i m doing lookup based on column having datatype varchar(16)[unicode]
You will need to convert your source datatype to Varchar, while trimming it and then do the lookup.
Kris

Where's the "Any" key?-Homer Simpson
Post Reply