0

I am new to NiFi. My question is how can we read json file in ECMAScript while using excute script process. I want to load json file with mapping json for schema mapping.

user7337271
  • 1,662
  • 1
  • 14
  • 23
Siraj ul Haq
  • 845
  • 9
  • 25

1 Answers1

2

I have an post on my blog about how to read in a flow file containing JSON using ExecuteScript with ECMAScript:

http://funnifi.blogspot.com/2016/03/executescript-json-to-json-revisited.html

There is also another StackOverflow question similar to your use case of reading in a mapping file and applying it to incoming data (using Groovy):

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file

Not sure if this helps too but I have another post on validating JSON with ExecuteScript (but Groovy not ECMAScript) using JSONSchema: http://funnifi.blogspot.com/2016/05/validating-json-in-nifi-with.html

Community
  • 1
  • 1
mattyb
  • 11,693
  • 15
  • 20