using hashfile

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
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

using hashfile

Post by avi21st »

hi gurus,
how can i use hashfile.
i want to join 2 tables from my database.
i used odbc and hash file, when i edit hashfile it promptly asks for universe account name and directory, but my source data is in oracle.
how can i connect my hashfile to oracle.
can't we use hashfile directly to connect to oracle and retrieve data.

plz help me , how can i use my hashfile in joining 2 tables from oracle.
plz help me.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is no such thing as a hashfile.

A hashed file is a database table in its own right.

A Hashed File stage can connect to a hashed file. It can not connect to anything else.

You connect an Oracle OCI stage or an ODBC stage to Oracle. If you need to populate a hashed file from Oracle, create a DataStage job to do so.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

hi gurus,
thanks very much.
how can i populate my table from odbc into hashfile.
what should i specify in odbc stage inorder to populate my data into hashfile, and then use hashedfile stage to access that data.
plz help me.

cheer;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

ray.wurlod wrote:There is no such thing as a hashfile.
As Ray said, it is called a hashed file.

Code: Select all



ODBC Stage------>HashedFile Stage

Usually, hashed files are created in a 'Directory path'. So choose the path where you want the hashed file to be. Declare the name of the hashed file.

There is no specific info to be specified in the ODBC stage inorder to load a hashed file from it. The regular DSN, Username, password and the right meta-data should be it.

Build your job and then get back if you have any more questions/errors.

Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

hi gurus,
thanks very much.
odbc--->hashfilestage.
when i browse the hashedfile stage,iam specifying a path where to create the hashfile.
iam giving create file.
in update action iam giving- clear file before create.
but iam getting warning. due to which the data is not dumped from odbc to hashed file.plz help me.
hashfilecreation..Hashed_File_1.DSLink4: DSD.UVOpen mkdbfile: cannot create file C:\Ascential\DataStage\hashfile2\DSLink4

plz help me why am i getting this warning.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Check the permission for the directory C:\Ascential\DataStage\hashfile2, it can be readonly. Else give some other directory with proper file name.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

May be the hashed file is corrupted.
In the options while creating the hashed file, check on "delete file before create".

Or it could be a permission issue.

Get back if you these dont help
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The pathname that you give must be the pathname of an existing directory (folder). You must have permission to write into this directory.

In particular, you do not give the pathname of the hashed file on the Stage tab, only that of the parent directory in which the hashed file is to be created.

The name of the hashed file is given as a property on the Inputs tab.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Post by avi21st »

hi gurus,
tried various ways, but still getting warning.
This is what i specified the location of directory in my stage.
C:\HashFiles\Hash_File2

iam getting warning as
hashfilecreation..Hashed_File_1.DSLink4: DSD.UVOpen mkdbfile: cannot create file C:\HashFiles\hash\DSLink4.
plz help me.

cheers;
abhi
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

avi21st wrote:DSD.UVOpen mkdbfile: cannot create file C:\HashFiles\hash\DSLink4.
plz help me.

cheers;
abhi
Do you have the

Code: Select all


C:\HashFiles\hash\

directory structure present on the DataStage Server Box?

For testing purposes, Try giving the directory path as

Code: Select all


C:\Temp

and name of the hashed file as

Code: Select all


My_First_Hashed_File

instead of DSLink4.

Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

LOOK at the error message!

What you say is not what you did, or the error message is not being generated from the Hashed File stage you have been tampering with.

You claim to have specified C:\HashFiles\Hash_File2 as the directory pathname.

Why, then is DataStage trying to create a hashed file called DSLink4 in a directory called C:\HashedFiles\hash ?

Please don't allow hashed file names to default to link names. It makes life so much more difficult for the poor sod who has to maintain your sloppy work.
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