Universe Stage

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
dickfong
Participant
Posts: 68
Joined: Tue Apr 15, 2003 9:20 am

Universe Stage

Post by dickfong »

Got a how-to question with the UV stage.

We have 2 DS projects, Project A and Project B
In Project A, we have a project hash HASH1 created
In Project B, is it possible(and how) to perform the followings tasks?

1. Extract data from HASH1 using UV stage in ProjectB
2. Joining HASH1 with another project hash HASH2, which has been created in Project B, on a common key

Thanks and regards,
Dick Fong
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi Dick,

You can access any Hashfile in any project you want if the file is in your reach. (Same server, mounted via NTFS or remote Universe)

Every time you use one file in more than one job you should know what you are doing, how the writing or deleting of the Hashfile of Job A will influence Job B. If that is okay, there is no reason why not to use it.

I suppose, that you know how to access Hashfiles.
If they are written in a Path it is no problem.
If written in a project you have to use their project path or you have to make them known to the new project.

Wolfgang
dickfong
Participant
Posts: 68
Joined: Tue Apr 15, 2003 9:20 am

Post by dickfong »

What we tried to do but failed was

In Project B, we have a job with a UV stage
In the UV stage, we put 'localuv'in the Data Source Name
In table mame, we put HASH1 (we tried ProjectA.HASH1 as well)
Then we loaded the table definition and click 'View Data'
DS complained that there are no hash file with name HASH1

Any idea of what's wrong with it?

Thanks in advance.
Dick
chinek
Participant
Posts: 75
Joined: Mon Apr 15, 2002 10:09 pm
Location: Australia

Post by chinek »

Hi

Why are you using the UV stage to access a hash file?
Once you have created the hash file it exists in your server's
filesystem,so you can access that file with a hash file stage in
your other job by providing the directory path and hash file name.

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

Post by ray.wurlod »

Is definitely IS possible to access hashed files via UV stage, and UV tables via HashedFile stage, because they're the same thing under the covers. However, only the HashedFile stage type allows management of memory caching.

I suspect you have created HASH1 in ProjectA using a pathname, rather than an account, as its location. This has long been touted as best practice on this forum and elsewhere.

All is not lost. All you need to do is execute a command in ProjectA and ProjectB (perhaps through the Administrator client) to put an entry into the VOC (vocabulary) of the project referring to the hashed file's name and location. That command is:
SETFILE pathname filename [ OVERWRITING ]

For example, if you created HASH1 in directory /u03/data/, then its pathname is /u03/data/HASH1, so the SETFILE command is:
SETFILE /u03/data/HASH1 HASH1

Once this is done in both ProjectA and ProjectB, the hashed file HASH1 will be accessible from both.

The approach of using ProjectA.HASH1 from ProjectB will only work if the hashed files were created as UV tables, as the qualified table name approach requires entries in the SQL system tables. Creating hashed files does not create these entries; creating UV tables does.



Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
dickfong
Participant
Posts: 68
Joined: Tue Apr 15, 2003 9:20 am

Post by dickfong »

It is resolved [:)]
Thanks a lot
Post Reply