โ11-05-2020 04:13 PM
hi there, i am trying to append all the records for the day to that days CSV file which has date in the file name.
all works fine, if it doesnt fnds the file for the day it creates the file. if it finds the files then it appends the data to the file.
But one thing is keeps adding the column names as well to the file. How can i have the only data be appended and not the column headers?
Thanks
Manohar
โ11-06-2020 07:39 AM
Just an update I tried using Directory Browser snap and it worked fine what I am looking for; but data is lost post this snap, I get the output of the Directory Browser snap which is. not sure if its right solution.
ok2pay_11-06-2020.csv sftp://Sftp.com:22/ok2pay_11-06-2020.csv File unknown 2020-11-05T19:16:07.000-05:00 72 unknown rw-rโrโ
it errored out because above record and its format of the row is not matching the data columns already there
โ11-09-2020 05:41 AM
HI Igor, thanks for looking in. I was able to get this working by adding a mapper after the router and pulling just the original data. heres my final solution. Added Splitter to Flatten array data.
โ11-09-2020 07:06 PM
Nice! I had a similar problem before for my solution I had a default file where the column names are already writtenโฆ then use this template pipelineโฆ then on the csv formatter unchecked the write header then in file writter append ๐
โ11-07-2020 02:49 AM
Hi @manohar,
Are you using the APPEND setting of the file writer?
Then, you check the supported protocols for APPEND in the docs (https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438927/File+Writer)
If all good so far, then one of the csv formatter snaps should be having checked the โinclude headersโ setting and the other one without it checked.
/Igor