Page 1 of 1

Use of Metadata in DataStage stages

Posted: Fri Jan 20, 2012 9:50 am
by ghammer
My question is:
Is it possible to get access to metadata "inside" a stage.
As an example: is it possible in a transformers derivation code to have knowledge about the metadata for the column being processed?
Behind this is the idea that in a shared container one should be able perform processing based on a columns actual type and length (metadata). Which is unknown at design time.

Thank you in advance.

Posted: Sat Apr 07, 2012 9:16 am
by jerome_rajan
Add the environment variable $OSH_PRINT_SCHEMAS. The runtime schema will be made available to you in Director logs.

Not sure if this is what you are looking for

Posted: Sat Apr 07, 2012 2:53 pm
by ray.wurlod
Welcome aboard.

Question: why is the metadata unknown at design time? On what, therefore, are you basing your design?

Posted: Sun Apr 08, 2012 9:14 am
by eostic
I've always wanted to do this in a generic routine.....be able to determine exactly "what" column I was working with on the input link, its datatype, length, etc., so that I could apply it everywhere and react differently based on the run-time metadata coming in..........If I need this I use JavaPack, which has access to all of that, but to have it directly in a Derivation might be nice too....

Ernie