Skip to Content

Source File name passing to Traget field name

May 09 at 10:03 AM


avatar image

Hi Experts ,

I am having one requirement to read the source filename and pass this value to Target field name.

I used Dynamic configuration UDF :

  String FileValue = "";
    //Get the DynamicConfiguration instance
    DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    //Define key to read from the Dynamic Configuration
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create("", "FileName");
    //Read the FileName parameter from the Dynamic Configuration based on the key
  String filename = conf.get(key);
  }catch(Exception ee)
    FileValue = "";
  return FileValue;

I am getting an error like while activating mapping :

String filename = conf.get(key) is not valid .

Can anyone suggest, how to fix this.

Best , Shiva

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Vivek Jain May 09 at 10:20 AM

Hi Shiva,

It should be conf.get(key1)


Vivek Jain

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Sorry , should be config.get(key1);


Vivek Jain