Support Questions
Find answers, ask questions, and share your expertise

How can we read the flowfile attributes inside the ExecuteSparkInteractive

New Contributor

Have a use case where need to pass the flowfile attributes to the spark job so that it runs the job against that flowfile itself and also nifi will handle the concurrency on the same. And also can we configure multiple livy servers/host in LivySessionController.

1 REPLY 1

Explorer

1 use ReplaceText Processor just before ExecuteSparkInteractive and paste your code in ReplaceText Processor and you can access attributes in replace text processor using nifi expression like ${attributename}.

2 In ExecuteSparkInteractive ,keep code peoperty as empty because This property can be empty, a constant value, or built from attributes using Expression Language. If this property is specified, it will be used regardless of the content of incoming flowfiles. If this property is empty, the content of the incoming flow file is expected to contain valid code to be issued by the processor to the session.Note that Expression Language is not evaluated for flow file contents.

Hope This will work.