Skip to main content

Calling Runtime Values from within Jython Evaluator.

  • February 19, 2022
  • 0 replies
  • 94 views

AkshayJadhav
StreamSets Employee
Forum|alt.badge.img

Question:

When using the Jython Evaluator processor, how can a user call runtime values (e.g. passwords stored as runtime resources)?

 

Answer:

As mentioned in https://ask.streamsets.com/question/1486/referring-to-a-runtime-resource-with-jython/, the user can load the content of the pipeline resource into the Jython script using the ${runtime:loadResource(<file name>, <restricted: true | false>)} EL function.

For example:

record.value['f'] = '${runtime:loadResource('myfile', false)}'

Data Collector will insert the content of the runtime resource file before running the script.

 

You can find more information about Runtime Values in our documentation here.

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply