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
dnat
Participant
Posts: 200 Joined: Thu Sep 06, 2007 2:06 am
Post
by dnat » Sun Dec 27, 2009 10:48 pm
Hi,
I have to lookup a hour dimension table and get the sequence id for the same
For ex, i have the time like this
01:10
And in the dim table, i have values like this
Seq_i|hr start time|hr end time
1111|01:00|01:59
So i need to get the value 1111 since my input 01:10 is in between hr start time and hr end time. Can you suggest how to do this?.
nagendradsx
Participant
Posts: 1 Joined: Sun Nov 08, 2009 7:40 am
Location: da
Contact:
Post
by nagendradsx » Mon Dec 28, 2009 12:11 am
can you triy with rangelook up if you have 8
gssr
Participant
Posts: 243 Joined: Fri Jan 09, 2009 12:51 am
Location: India
Post
by gssr » Mon Dec 28, 2009 12:50 am
Hope this wil work,
1.Convert the start and end time to Int datatype (i.e., 1.00-->60 and 1.59 --> 119)
Similarly convert the same in your source file.
2. Try to get the matched constraint that lookup with those range of records
RAJ
gssr
Participant
Posts: 243 Joined: Fri Jan 09, 2009 12:51 am
Location: India
Post
by gssr » Mon Dec 28, 2009 12:54 am
gssr wrote: Hope this wil work,
1.Convert the start and end time to Int datatype (i.e., 1.00-->60 and 1.59 --> 119)
Use the function " Minutes FromTime"
RAJ
dnat
Participant
Posts: 200 Joined: Thu Sep 06, 2007 2:06 am
Post
by dnat » Mon Dec 28, 2009 5:28 am
Try to get the matched constraint that lookup with those range of records
---how to lookup for those ranges.
srinivas.g
Participant
Posts: 251 Joined: Mon Jun 09, 2008 5:52 am
Post
by srinivas.g » Mon Dec 28, 2009 6:09 am
Put lookup condition like:
time(reference)<hr start time and time(referencelink)>hr end time
Srinu Gadipudi
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Dec 28, 2009 7:58 am
I would build the lookup using truncated values since all that matters is the hour value. Then no 'range' lookup would be required.
-craig
"You can never have too many knives" -- Logan Nine Fingers