Hi everyone,
we are finding a solution for the following problem:
we are using DataStage 5.1
we have a lookup on a target table with an hashed file.
We'd like to insert a record in the target table and we want that this record is immediatly visible (stored) in the lookup hashed file.
In this way if the second record have the same key value of the record already loaded, we can update it.
I know that there is a lot of way to do this without hashed file but unfortunatelly we are obliged to do it in this way
Thank you, in advance.
Strange question about lookup hased file
Moderators: chulett, rschirm, roy
Hi Geppo,
don't mind this is a method, which makes sense and is often used. You have to pay attention, that your Lookup-Hash-File is not stored in Memory so you have your updates at once.
Wolfgang
don't mind this is a method, which makes sense and is often used. You have to pay attention, that your Lookup-Hash-File is not stored in Memory so you have your updates at once.
Wolfgang
Hi everyone,
we are finding a solution for the following problem:
we are using DataStage 5.1
we have a lookup on a target table with an hashed file.
We'd like to insert a record in the target table and we want that this record is immediatly visible (stored) in the lookup hashed file.
In this way if the second record have the same key value of the record already loaded, we can update it.
I know that there is a lot of way to do this without hashed file but unfortunatelly we are obliged to do it in this way
Thank you, in advance.
Hi Wolfgang,
sorry but we don't understan what you mean.
We try to set "Disabled" (and "Disabled, Lock for Updates") the "Pre-load file to memory" menu in the "outputs" of hashed file but it doesn't works!
We're right?
Thank you
Geppo
sorry but we don't understan what you mean.
We try to set "Disabled" (and "Disabled, Lock for Updates") the "Pre-load file to memory" menu in the "outputs" of hashed file but it doesn't works!
We're right?
Thank you
Geppo
Hi Geppo,
don't mind this is a method, which makes sense and is often used. You have to pay attention, that your Lookup-Hash-File is not stored in Memory so you have your updates at once.
WolfgangHi everyone,
we are finding a solution for the following problem:
we are using DataStage 5.1
we have a lookup on a target table with an hashed file.
We'd like to insert a record in the target table and we want that this record is immediatly visible (stored) in the lookup hashed file.
In this way if the second record have the same key value of the record already loaded, we can update it.
I know that there is a lot of way to do this without hashed file but unfortunatelly we are obliged to do it in this way
Thank you, in advance.
-
- Participant
- Posts: 18
- Joined: Mon Nov 25, 2002 3:23 am
- Location: Switzerland
The method that I have used is as the follow (see diagram):
..............................HashFile2
.................................|
.................................V
Input->Tranformer1->Transformer2->Target
.............|...................|
.............V...................V
..........HashFile1............HashFile3
Note:
1. All three hashfiles are pointing to the SAME hash file, i.e. have the same hash file name.
2. Hshfile1 is just a dummy to create the hash file on first runtime. Without it, the job will fail as it would not be able to find HashFile2 in the lookup.
3. Hashfile2 is to perform lookup to see if the file is already in the targetDB. If not exist, then load into target DB as well as HashFile3
4. When the next record comes in, as the Hashfile 2 and Hashfile3 are the same, previous records would be in the file already.
5. Remember to select "clear file before writing" on the Hashfile3. And, don't use cache or memory for lookup or updates.
I hope this helps.
constc
Edited by - constc on 11/28/2002 20:06:31
Edited by - constc on 11/28/2002 20:07:05
..............................HashFile2
.................................|
.................................V
Input->Tranformer1->Transformer2->Target
.............|...................|
.............V...................V
..........HashFile1............HashFile3
Note:
1. All three hashfiles are pointing to the SAME hash file, i.e. have the same hash file name.
2. Hshfile1 is just a dummy to create the hash file on first runtime. Without it, the job will fail as it would not be able to find HashFile2 in the lookup.
3. Hashfile2 is to perform lookup to see if the file is already in the targetDB. If not exist, then load into target DB as well as HashFile3
4. When the next record comes in, as the Hashfile 2 and Hashfile3 are the same, previous records would be in the file already.
5. Remember to select "clear file before writing" on the Hashfile3. And, don't use cache or memory for lookup or updates.
I hope this helps.
constc
Edited by - constc on 11/28/2002 20:06:31
Edited by - constc on 11/28/2002 20:07:05