Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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.


Re: FlowFile content overwritten in NiFi

Master Collaborator

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.






If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  



Steven @ DFHZ

Don't have an account?
Coming from Hortonworks? Activate your account here