Dynamic Look up using Has File Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Abhinav
Premium Member
Premium Member
Posts: 65
Joined: Tue Jun 29, 2004 10:26 am
Location: California

Dynamic Look up using Has File Stage

Post by Abhinav »

Hi all

I am getting a compilation error when i use a dynamic lookup with hash file

Compilation Error : Job contains cyclic or linear dependendiews and will not run.


Any help on Compilation error.

Abhi
sumitgulati
Participant
Posts: 197
Joined: Mon Feb 17, 2003 11:20 pm
Location: India

Post by sumitgulati »

I think there is a flaw with the job design. You probably are forming a loop between stages. Just insert a static stage (say a hash file) between two of your active stages and then try compiling.

Regards,
Sumit
Jamesvanam
Participant
Posts: 40
Joined: Tue May 18, 2004 10:51 pm

Post by Jamesvanam »

Hi Abhinav,
I beleive what you are doing is updating the same hash file, I mean

try this design
Hash A
|
|
V
SRC--------------------------->XFM------------------>TGT
|
|
|
V
Hash A
if this doesn't work then you will have to use two transforms, first one look-ups the Hash A and the second one updates Hash A and then the Target

Hope this helps
James
VamshiReddy
Participant
Posts: 5
Joined: Sat Jun 19, 2004 9:55 am

Post by VamshiReddy »

Jamesvanam wrote:Hi Abhinav,
I beleive what you are doing is updating the same hash file, I mean

try this design
Hash A
|
|
V
SRC--------------------------->XFM------------------>TGT
|
|
|
V
Hash A
if this doesn't work then you will have to use two transforms, first one look-ups the Hash A and the second one updates Hash A and then the Target

Hope this helps
James

I got the dynamic lookup part working, but the problem is the column which i have in my lookup from srce is the unique key and when i have the duplicates in it .

The lookup doesnt accept the duplicates as the prinmary key for the Hsh fiel is the same column which is a unique key column for the source.

if i use the Stage Variable i am able to get the cloumn changed to -1 for one of my columns in tgt which indicates that its a void record as a record already exists with the same unique column .

what i need to do is i need to copy forward the record which is repeated in my source and change the column to -1 indicating that this record is a void one. and the latest record would be set to 1.

Any help on this would be great.

Thanks

Abhi
Post Reply