Can any one help to solve the problem ...............

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
narasimhareddy
Participant
Posts: 10
Joined: Wed Nov 30, 2005 8:12 am

Can any one help to solve the problem ...............

Post by narasimhareddy »

Hi,


I have flat file (source) contains fields like city,country,... .
Target dimention table (country) contains fields like country,city,... and so on.
In my source field country, some times empty.... if it is an empty i have to identify the country for that corresponding city field, then i have to pass data in to the dimention table.

Regards,
Reddy.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

In order to solve this problem you need to have a look-up of City to Country (Code or Name). From the transformer filter those rows by having the logic
IF Link ISNULL
and store it in a Dataset.
Then use that dataset to lookup into the City to Country data set that is provided to you.
That should solve the issue. :D
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Can you not create a dataset keyed by city with the country it is in as the data element? Then you can look it up on the way in and use it if the original value is null. Only problem with that would be when the same city name is in multiple countries...
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Do a lookup on City.
In the Conditon option of the reference data, check for country = Null.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply