Page 1 of 1

Get input field name?

Posted: Thu Jun 30, 2016 9:46 am
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?

Posted: Thu Jun 30, 2016 9:53 am
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

Posted: Thu Jun 30, 2016 1:50 pm
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.