Hello All,
Here I am trying to understand a previous built job. what results do I get when I have two output links with different transformations writing to a single hash file with single key? On what situations do we use this kind of logic?
If we check only the 'Clear File before writing' and uncheck the 'create file' options on the hash file stage, will these options create a hash file? or is it must that 'create file' option should be checked to create hash?
thanks
Hash Logic
Moderators: chulett, rschirm, roy
Re: Hash Logic
Clearing the file before writing has no bearing on whether it gets created or not. Think of it as a 'truncate' for the hash file.rcil wrote:If we check only the 'Clear File before writing' and uncheck the 'create file' options on the hash file stage, will these options create a hash file? or is it must that 'create file' option should be checked to create hash?
Hash files will get created regardless of whether you have the 'Create File' option checked or not. If it doesn't exist when it goes to write to it, DataStage will create it. What you buy when you enable it is the 'Options' that come along for the ride. If you don't use or change a single option, then don't bother to check the create file box. Once you do, however, you can change the type from its default of 30, increase the Minimum Modulus to 'presize' it, or delete the hash and recreate it every run of the job - amongst other things.
What do you get? The classic hash file answer - destructive overwrite, so last one in wins. In what situations would you do this? Can't really say, hopefully ones where that makes sense.Here I am trying to understand a previous built job. what results do I get when I have two output links with different transformations writing to a single hash file with single key? On what situations do we use this kind of logic?
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers