Skip to main content
Question

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

  • April 18, 2023
  • 1 reply
  • 34 views

himanshu1234567
Discovered Fame

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

Forum|alt.badge.img
  • StreamSets Employee
  • 20 replies
  • April 19, 2023

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.