initialize a hash file using a parameter
Moderators: chulett, rschirm, roy
initialize a hash file using a parameter
Hi Guys and Miss !
My question is what is the best practice to initialize a hash file ?
This Hash file is using to keep a sequence number. But Sometimes we want to initialize this sequence number.
I create a different job just for the initialzation (I don't want to enable the initilization in the daily job)
I Use a transform with parameters, all is fine but the transform need and input link. Is it possible to disabled the input link of the transformer or something else ?
Currently I have an dummy input sequential file in order to run correctly the job but I think it isn't the better way ...
My question is what is the best practice to initialize a hash file ?
This Hash file is using to keep a sequence number. But Sometimes we want to initialize this sequence number.
I create a different job just for the initialzation (I don't want to enable the initilization in the daily job)
I Use a transform with parameters, all is fine but the transform need and input link. Is it possible to disabled the input link of the transformer or something else ?
Currently I have an dummy input sequential file in order to run correctly the job but I think it isn't the better way ...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There's no real best way.
A job that consists of a Transformer stage followed by a Hashed File stage would do it. Use a stage variable to "calculate" the initial value, and the job parameter (List type, values 0 or 1, default 0) used to constrain the output, along with @OUTROWNUM = 1. On the output link are two columns; sequence name and sequence value (however these are named in the hashed file).
Note that it's "hashed" file, not "hash" file. It's a file that uses a hashing algorithm to determine the physical location of records based on their key value.
A job that consists of a Transformer stage followed by a Hashed File stage would do it. Use a stage variable to "calculate" the initial value, and the job parameter (List type, values 0 or 1, default 0) used to constrain the output, along with @OUTROWNUM = 1. On the output link are two columns; sequence name and sequence value (however these are named in the hashed file).
Note that it's "hashed" file, not "hash" file. It's a file that uses a hashing algorithm to determine the physical location of records based on their key value.
Last edited by ray.wurlod on Wed Jun 07, 2006 4:03 pm, edited 1 time in total.
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.
It's just an example,
I set a dummy sequential file and I know that I just need one row.
But If someone else, like a new datastage developper, want to run this job I think he'll not understand why I set this dummy file.
This is why I'm looking for a more simply solution and with more maintainability. In fact if we forgot to create this dummy file after a migration the job will abort...
I set a dummy sequential file and I know that I just need one row.
But If someone else, like a new datastage developper, want to run this job I think he'll not understand why I set this dummy file.
This is why I'm looking for a more simply solution and with more maintainability. In fact if we forgot to create this dummy file after a migration the job will abort...
You can access the hashed file by universe stage, if its in the project account offcourse, and do a sql update to it.
As far as your concern for a new developer goes, use the annotation. I promise Ascential wont charge you for that
Infact, use annotations as much as you can. Always presume that you need to spoon feed the other developer who is going to take over later on. Helps in maintaining and enhancing the jobs.
Regards,
As far as your concern for a new developer goes, use the annotation. I promise Ascential wont charge you for that
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
Infact, use annotations as much as you can. Always presume that you need to spoon feed the other developer who is going to take over later on. Helps in maintaining and enhancing the jobs.
Regards,
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: