Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 07-29-2021 11:12 PM - edited 07-29-2021 11:59 PM
which processor can be used to extract(read) only the header( 1st row of the file) of a csv file.
Created 07-29-2021 11:36 PM
Created 07-29-2021 11:43 PM
why do we need ReplaceText processor here, could you please explain? .I just want to extract the header (1st row) . and do not want to replace the header with any other text.
Created on 07-30-2021 01:09 PM - edited 07-30-2021 01:12 PM
Hi,
Once you extracted the header into Flowfile attribute using ExtractText processor, next you are going to convert the header flowfile attribute into Flow file content OR you can keep the header value as in attribute ..The stack overflow explains about extracting header into flowfile attribute and next they have pass the headers as file into destination .To convert flowfile attribute to file/flowfile content ,we will have to use ReplaceText processor where you can pass flowfile attributes .. The success relationship of ReplaceText will only contains header in flowfile content and the original csv file will be replaced with header as content . The flowfile content, you can transfer to destination or next processor in the flow.
Hope this information you are looking for ..
Thanks