hashfile in shared container

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
nilotpalr
Participant
Posts: 29
Joined: Tue Dec 10, 2002 2:54 am

hashfile in shared container

Post by nilotpalr »

Hi,
As per a design directive I need to use hashfiles as lookups. So I have to pre-load my oracle dimension table in a hashfile.

I proceeded the following way:
1) Created a shared container where I did the following:
OCI -------> Transformer ----------------> Hashfile
Hashfile stage has following settings:
- Allow Stage write Cache
- Clear file before writing
2) Then I am using the shared container as a lookup in my job

I am getting the following error when I try to compile my job:
Container Stage Output link count does not match number of links in the shared container.

Please help
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your shared container must have a means of sending its results out. You need something like this:

Code: Select all

   ++++++++++++++++++++++++++++++++++++++++++++++
   + OCIStage  ---->  HFStage   ----->  COutput +
   +           lk1                lk2           +
   ++++++++++++++++++++++++++++++++++++++++++++++
where COutput is a "Container Output" stage.
In your job design, you have:

Code: Select all

                    Container
                       |
                       |  lk2
                       V
SourceStage -----> Transformer  ----->  OtherStages
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nilotpalr
Participant
Posts: 29
Joined: Tue Dec 10, 2002 2:54 am

Post by nilotpalr »

Hi Ray,
Pls correct me if i am wring. What I have understood from your tip is that If i create a physical file(hash) then I should be fine. I could not understand the - "container must have a means of sending its results out". If I amcreating the hashfile physically then it is available to me .

Am I missing something..

Pls advice.

thanks,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

nilotpalr wrote:Pls correct me if i am wring. What I have understood from your tip is that If i create a physical file(hash) then I should be fine. I could not understand the - "container must have a means of sending its results out".
No, there's more to it than simply creating the hash file in the Shared Container. What Ray is trying to point out is the need to have some way to pull data 'out' of the Shared Container, not just simply (in essence) put data in it when you want to use the Hash in it as a lookup. He wanted to know if you have a Container Output stage in your Shared Container. Also, in order for you to use it as a lookup, the connector to the Output stage must be a Reference link, not a Stream link. If the line is solid instead of dashes then right-click on it and select 'Convert to Reference'.

Once those are in place, you should be fine I would think.
-craig

"You can never have too many knives" -- Logan Nine Fingers
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

The philesophy of DataStage is to have Stages which are linked via links. Via this link data are flowing.

With a Container (shared or local) you have the opportunity to hide one or more Stages within such a Container.

If you use your container in a Job you must link the input or the output or both to a dataStream within Your Job, for example via a Reference Stream to you container as Ray illustrated with a high grade of details.

What you can do alternativly is to have a Job1 which fills your HashFile from Oracle and a Job2 to Jobn which uses the HashFile of Job1, therefore you need no container.

If you place your container without link in your job and you use also the same hashfile in your main stream, both activities will start at the same time and this doesn't fit your needs.

So follow the way Ray told you. In Ray you can trust.

Wolfgang
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

WoMaWil wrote:In Ray you can trust.
Luckily I know Wolfgang isn't in the USA, otherwise I'd be forced to comment that this is a bit unnecessarily messianic! :wink:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply