I have csv log files that I convert to GeoJSON with ogr2ogr
and then run sed
against to clean up for elasticsearch. Specifically:
ogr2ogr -f "GeoJSON" output.json input.csv
sed -i -e '1,4d' -e '$d' output.json # delete first four lines and last line
sed -i '1 i\[' output.json # insert line with '[' at beginning of file
I would like to run these commands in NiFi but I have not had any luck configuring ExecuteProcess.