i am writing to a hash file first and in the second transformer i read from it for a lookup. I dont have any caching enabled for the hashfile.
Will this work? will all the records be written successfully before the read operation begins?
ANY HELP IS APPRECIATED.
---------- ------- ------- -----------
ORAOCI ---> TXFR ----> TXFR ----> Seqfile
---------- ------- ------- -----------
| /\
V |
----------- -----------
Hash file Hash file
------------ -----------
Thanks,
G
Write and Read the same hash file in same job?
Moderators: chulett, rschirm, roy
We really should have a better picture of your job to give you a proper answer. Wrap your ascii art in 'code' tags so that spacing is preserved. Make liberal use of the 'Preview' function to ensure it all lines up properly. Keep at it until you get something usable.
Then we can talk.
Then we can talk.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It will work, provided you don't use caching for read or write. Also enable lock for update. It is essential that you use separate Hashed File stages; add an annotation warning future developers that the two stages refer to the same hashed file (not hash file).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Write and Read the same hash file in same job?
Code: Select all
------- ------- ------- -----------
ORAOCI ---> TXFR ----> TXFR ----> Seqfile
------- ------- ------- -----------
| /\
V |
----------- -----------
Hash file Hash file
----------- -----------
Depending on what you mean by 'work' the answer is either yes or no. Yes, a record written in the first xform will be available for lookup in the second - if you follow Ray's advice.
If work is related to your second question - then no. DataStage will process a record from source to target before the second record starts its journey. So, no, not all records will be written to the hashed file before the read operation begins. Is that what you need? All writes before all reads? Not sure that makes sense, if that's what you need please explain your requirements...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 232
- Joined: Fri Sep 30, 2005 4:52 am
- Contact:
Re: Write and Read the same hash file in same job?
Yes, It works better dont enable caching.Desigal24 wrote:i am writing to a hash file first and in the second transformer i read from it for a lookup. I dont have any caching enabled for the hashfile.
Will this work? will all the records be written successfully before the read operation begins?
ANY HELP IS APPRECIATED.
---------- ------- ------- -----------
ORAOCI ---> TXFR ----> TXFR ----> Seqfile
---------- ------- ------- -----------
| /\
V |
----------- -----------
Hash file Hash file
------------ -----------
Thanks,
G
Thanks,
Anuapm
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
Do you think the order of the output links in the first transform stage is important? If so, I suggest you order your output links to ensure that the write to the hashed file occurs before the passing of the row from the first transform to the second.
Chuck Smith
www.anotheritco.com
www.anotheritco.com