Question

while we reading from config file how we can convert string into expression

  • 18 April 2023
  • 1 reply
  • 26 views

Hi team,

I am using expression evaluator i want to read one parameter from data collector configuration file.

Parameter is  = runtime.conf_expression=${record:value('/salary')}

While reading in expression evaluator I am reading in this way ${runtime:conf('expression')} but output is coming as string . I want output as expression so that it can be evaluated.


1 reply

Userlevel 1
Badge

StreamSets pipelines do not allow treating runtime parameters as expressions because that tends to create security issues with untrusted code. Instead, you should create a set of options and pass in the key for the one you want.

If the number of options is large, this may be easier to do using a switch-case statement in a JavaScript (or other scripting) processor.

Reply