Metadata - list of all tables

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Metadata - list of all tables

Post by prabu »

Hi DataStage Folks,
Hope you all do great. i would like to know the following:-

1)Is there any table that lists all the available system table[internal tables] information of datastage?. something like in Oracle below.

Code: Select all

LIST DICT MYTOPLEVELMETADATATABLE 
:D

Code: Select all

SQL> desc dict
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 TABLE_NAME                                         VARCHAR2(30)
 COMMENTS                                           VARCHAR2(4000)
2)i would like to get a list of jobs that use a particular oracle table, say TIME_DIM table. can this be derived from the metadata tables?? :roll:


excuse me if i have posted this in a wrong forum


regards,
Prabu
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

export metadata to database!!!!

Post by prabu »

sorry, forgot to add , is it possible to export these system tables to some other db say oracle.

regards,
Prabu
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi Prabu..
You can know which jobs used a particular table...Go to DS manager/table definations/go to your table/click on it and click usage analysis...You can see relationship of the table with the type ,category, name of the job and source...
Check it out...
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Re: export metadata to database!!!!

Post by meena »

You want to export the systemtables from datastage to a database..Is it right...
prabu wrote:sorry, forgot to add , is it possible to export these system tables to some other db say oracle.

regards,
Prabu
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Re: export metadata to database!!!!

Post by prabu »

meena wrote:You want to export the systemtables from datastage to a database..Is it right...
that's correct
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

meena wrote:Hi Prabu..
You can know which jobs used a particular table...Go to DS manager/table definations/go to your table/click on it and click usage analysis...
Check it out...
that's great! thanks Meena. i'm curious to know, is the same kind of logic be extended to a file. say, i would like know all the jobs involed [either created or using] with a sequential file , say "primary_sales.lst".
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Yes Prabu...
You will do the same to a file too....Just select your file.and usage analysis..
prabu wrote:
meena wrote:Hi Prabu..
You can know which jobs used a particular table...Go to DS manager/table definations/go to your table/click on it and click usage analysis...
Check it out...
that's great! thanks Meena. i'm curious to know, is the same kind of logic be extended to a file. say, i would like know all the jobs involed [either created or using] with a sequential file , say "primary_sales.lst".
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The system tables are part of the DataStage engine. The respoitory tables are what I think you want a list of. The repository tables usually start with DS or RT. Most of what you want is in either DS_JOBS or DS_JOBOBJECTS. You can access these through SQL. The DataStage engine is an old version of a database called Universe. There is a shell to query this database called dssh or uvsh. This has all been explained in great detail. Extracting this metadata is part of what is included in EtlStats. You need to search for any of these terms to see in greater detail how to get the information you need.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Or, at rather more expense than EtlStats, you can use the vendor's preferred tool, MetaStage. The benefit of the extra cost is that this tool can also tell you where else (apart from DataStage) these tables and files have been used.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

repository table that lists all available repository tables

Post by prabu »

Thanks Kim & Ray! very helpful explaination.
kduke wrote: Most of what you want is in either DS_JOBS or DS_JOBOBJECTS. You can access these through SQL. .
coming back to my origianl question, is there any repository table that lists all available repository tables. something like a metadata table - data about data :roll:

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

Post by ray.wurlod »

All table names are recorded in the project's vocabulary. Therefore

Code: Select all

SELECT "@ID" FMT '50L' FROM VOC WHERE "TYPE" IN ('F', 'Q');
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

Wow Ray, you are a genius! :D
prabu
Participant
Posts: 146
Joined: Fri Oct 22, 2004 9:12 am

Post by prabu »

Code: Select all

>SELECT DISTINCT "TYPE" FMT '50L' FROM VOC
SQL+
TYPE..............................................

V
K
X
D
R
PA

F
M
PQ
Q
PH
S

13 records listed.

>SELECT  "TYPE" FMT '50L' FROM VOC WHERE "TYPE" IS NULL
SQL+

0 records listed.
i have tried UNIQUE in place of DISTINCT. but it gives me a syntax error. and suprisingly DISTINCT dislplays NULL also. is the meaning of DISTINCT different in Datastage ??

i have tried UNION, BETWEEN etc and it works great
or
1)What is the SQL compatibilty that datastage repository supports?
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

If you type HELP SQL then you can see some of what is supported. UNIQUE and other commands are used by Pick/Prime style commands. Universe is a derivative of Prime Information which is a derivative of Pick. Some of these keywords are used in both SQL and Pick style commands so it is difficult to know when it will work and when it won't. I would say keep trying it. Your DISTINCT may have pulled up a blank and not a null. What is or is not null in Universe is sometimes hard to figure out.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There are no nulls. What you are seeing is a blank "TYPE". This is an incorrectly (or lazily) stored VOC record. Don't worry about it. Try

Code: Select all

SELECT "TYPE",COUNT(*) FROM VOC GROUP BY "TYPE";
(TYPE is a reserved word in DataStage/SQL used in the CREATE TABLE statement. That's why it must be a quoted identifier.)
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