Transformers columns and value

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
bart12872
Participant
Posts: 82
Joined: Fri Jan 19, 2007 5:38 pm

Transformers columns and value

Post by bart12872 »

Hi,

With a routine, i want to retrieve all the output columns of a tranformer and the values

for exemple
transformer_name;output1; Ln_input.COL1
output2; Ln_input.COL2
...

Is it possible ? and How to do that ?

thanks,
Martin.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Transformers columns and value

Post by gateleys »

Why do you need a routine? Why not just pump your output to a sequential file with the first row set to Column Names. You'd get both column names and their values.
gateleys
bart12872
Participant
Posts: 82
Joined: Fri Jan 19, 2007 5:38 pm

Post by bart12872 »

In fact, the idea is to analyse transformers of 200 jobs.

I want to retrieve the value of the column 'REJ_TYP' for all transformers with this column.

in fact, i wrote a routine to list all the jobs and list all transformers in a job but i don't know how to retrieve column information

that's why i use routine to boucle with a for statement.
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

bart12872 wrote:in fact, i wrote a routine to list all the jobs and list all transformers in a job but i don't know how to retrieve column information

that's why i use routine to boucle with a for statement.
Of course you could write a routine to list jobs and their stages since these information are kept in DS_JOBS and DS_JOBOBJECTS files in the DS repository. However, for actual column values, you will have to dig them from the output files that share no relationship with the repository tables. So, you will not be able to get the value from your approach.

For the column names and values, I recommend that you get them from output sequential files as I suggested in my prior post. You could, however, name your file prefixed by the jobname and transformer name so that in your routine, you can include a code segment to read the 'appropriate' file for each job (based on job and transformer names).
gateleys
bart12872
Participant
Posts: 82
Joined: Fri Jan 19, 2007 5:38 pm

Post by bart12872 »

I can't modify all jobs it will take too long time.
but I'm asking a question, for curiosity, data are stored in project folder.
there is DS_JOBS, DS_JOBSOBJECTS, DS_METADATA and more, but there's also DS_TEMP594, RT_BP594, RT_BP594.O
(By UV request I'm supposed that 594 is the job id).
This last one contain the file V35S1_JxIPDV_Dept_GCO_Pk_Transformer_12.o
column and value must be stored there.

Can I read this object file ? Can I decompile it ?
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Post by gateleys »

Again, there is no way you can get the column value from any of those repository tables. That is a fundamental design of any software... separate your objects from the data.

The BP (Basic Programs) files do NOT store column values.
gateleys
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Column values only exist while a row is being processed. They are not stored anywhere within DataStage. Therefore the answer to your original question is that it is not possible to "get" the values other than within the job design itself, as others have noted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bart12872
Participant
Posts: 82
Joined: Fri Jan 19, 2007 5:38 pm

Post by bart12872 »

ray.wurlod wrote:Column values only exist while a row is being processed. They are not stored anywhere within DataStage. Therefore the answer to your original question is that it is not possible to "get" the values ...
In fact, this is not a 'value' I want to get but the derivation value in the transformer. When I open a job design, I can see it. Datastage must stock this info, no?

I sure at 99% this is possible to do that in Datastage server but in PX I don't know !!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Assuming you mean the derivation expression, yes of course it's stored with the design-time metadata. However no tools are provided with the product to accessing this information, so you would need to learn the internal structure of a parallel Transformer record in wherever it's stored in the Respository (and did you want the design-time, BASIC-like expression or the generated C++ expression?). This is not documented anywhere.
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