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

FlowFile content overwritten in NiFi

FlowFile content overwritten in NiFi

New Contributor

I am very new to NiFi, and I'm attempting to set up a very simple process to convert a CSV file to JSON.  When the file comes in, I take the file name and use ExecuteSQL to look up some processing instructions, like the destination directory for the final output. 

  1. GetFile - everything looks fine if I view content in data provenance. It's the contents of the CSV file.
  2. ExecuteSQL - everything looks fine if I view content in data provenance.
  3. ConvertAvroToJSON - I'm converting the result of the query to JSON so I can use it to set variables.  This is where I lose the content of the original file. Which I guess is reasonable, but I have no idea how to keep the original content.

I hope this makes sense.  If I can figure out how, I'll add images.

1 REPLY 1

Re: FlowFile content overwritten in NiFi

I would recommend to adjust the order so that you get the data you need from sql,  parse it to attributes in the flow, and then pickup the csv.