Get input field name?

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
IASAQ
Premium Member
Premium Member
Posts: 31
Joined: Wed May 04, 2016 11:07 am
Location: Montréal

Get input field name?

Post by IASAQ »

Hi all,

In a transformer stage, is there a way to get the input field name as well as its value dynamically?

For example, in a stage variable, using a custom routine, I could do something like this:

Code: Select all

myStageVar = myCustomRoutine(inputLinkFieldName, inputFieldNameValue)
Is this something that's possible?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

There may be some other tricks for it, but the only way I have seen to do this is by using the JavaIntegrationStage and using the java stage api to pull column names and then return them. It gives you the opportunity to pull the column names on a link by their index number....and then do what you need to with them, including return them to an output link.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

Are you asking for the column name or the link name?

The column names can be pulled out a couple of ways. (you can write a flat file with 1 record and column names and pull it back in as data for example, discarding the second row). I think you might also be able to pull them off a pass through carefully configured peek stage, I forget.

The link names are more trouble.
Post Reply