I am a rookie at both NiFi and Python and I need your help to pass the Flow File attribute value to the script. The script is converting a nested json into csv. When I run the script locally it works.
import pandas as pd
from pandas.io.json import json_normalize
src_json = "C:/Users/name/Documents/Filename.json"
tgt_csv = "C:/Users/name/Documents/Filename.csv"
jfile = open(src_json)
jdata = json.load(jfile)
How can I pass the FlowFile name to src_json and tgt_csv?
The above was originally posted in the Community Help track. On Sat May 11 02:55 UTC 2019, the HCC moderation staff moved it to the Data Ingestion & Streaming track. The Community Help track is appropriate for questions about using the HCC Community site itself.