Use of Metadata in DataStage stages

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ghammer
Participant
Posts: 1
Joined: Fri Jan 20, 2012 7:29 am
Location: Copenhagen

Use of Metadata in DataStage stages

Post 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.
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post 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
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Question: why is the metadata unknown at design time? On what, therefore, are you basing your design?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post 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
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply