Need to know what all ETL jobs used the Oracle 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

Post Reply
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Need to know what all ETL jobs used the Oracle Tables

Post by Titto »

HI,

Is there a way to find out in PX, what all ETL jobs been used a particular Table or File?

As we are using ODBC section and used User Defined SQL's.

Any Help is appreciated.

thanks
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 »

If you have a well maintained metadata repository, you can get this information by using "Usage Analysis" in the DS Manager client.

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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Kim has something like that which can tell you what table is being used up. Search this forum for etlstats.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

The usage analysis function in version 7.x doesn't really work that well. It is better in version 8. You would hope that the table names in your Oracle stages are accurate even though they are superseded by the user-defined SQL.

You could extract all your jobs to an XML output file and view it using an xsl stylesheet to only show the information you are interested in. Have a look at the xsl files in the DataStage client directory for examples. You could take one of these and remove all the code leaving just the Oracle plugin code and the properties you are interested in, all database table names for example.

A faster way is to get the dwnav from Kim Duke's website.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I disagree about Usage Analysis, provided that you have been meticulous with your table definitions and not broken the nexus between the table definition in the repository and the Job(s) in which it has 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.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You need to figure out what your stage types are. I would need to research where the SQL is stored. I wrote a routine once which can extract table names from SQL. I would need to go look for it. I was written for Oracle. It used a list of all the Oracle keywords to parse the SQL. I wrote it at BellSouth about 4 years ago or more. How bad you want this?
Mamu Kim
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I would start here.

Code: Select all

select 
   DS_JOBOBJECTS.OLETYPE AS STAGE_TYPE FMT '20L',
   Count(*) As Cnt
from 
   DS_JOBOBJECTS
group by 
   STAGE_TYPE
;
You may want to pick a specific job.

Code: Select all

select 
   DS_JOBOBJECTS.NAME AS LINK_NAME FMT '35L',
   DS_JOBOBJECTS.OLETYPE AS STAGE_TYPE FMT '20L'
from 
   DS_JOBOBJECTS, 
   DS_JOBS
where 
   DS_JOBS.NAME = 'BuildDayDimHash' 
   and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO 
;
Mamu Kim
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Post by pavankvk »

Kduke

where can e execute such queries? and where can i get all such information on DS_* in the universe?
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

In the Datastage Administrator "command", in the Project Tab.
Or in your OS.
Last edited by narasimha on Tue Jan 23, 2007 3:37 pm, edited 1 time in total.
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 »

THere is, theoretically at least, an infinite amount of knowledge in the universe, therefore it is impossible to get it all. Infinity is unattainable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I prefer to telnet into the DataStage server instead of using Administrator. You need to get to TCL. Search for TCL commands and you can see a lot of posts. EtlStats includes a lot of these SQL statements. My tips page now has a link to the EtlStats install video. This explains how to do TCL commands.
Mamu Kim
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You can also use DSExecute() if your thinking of doing this via routine.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Kim, all these will give the list of jobs and stages based on jobs and vise versa. But OP is looking fetch the Stages or Jobs based on the Table that been used, isn't?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

That is my point. I have not done this in PX. I am working with PX but to hack a solution then I need to know what OLETYPEs they are using. I should be able to figure it out.
Mamu Kim
Titto
Participant
Posts: 148
Joined: Tue Jun 21, 2005 7:49 am

Post by Titto »

Hello Guys
thanks for the different kind of inputs and solutions. Kim, We need this to be done with out high priority but we need to have this cross referrence some time next month.
I will try doing some solutions provided.
Keep you posted, but if any one has come up with good solutions please share.

Thanks
Post Reply