Skip to main content

We've set up a process for a client that takes data and writes it to CSV. That CSV is then loaded into a data warehouse.

That CSV conforms to the official CSV standards and thus the last line ends with a CR/LF:

Shown here in Notepad++. This means there's a last, empty, line in the file. The data warehouse system apparently cannot handle this. Is there a way to remove this last CR/LF from the file? (post-processing python, probably).

I must admit I am not convinced this should be fixed on the FME side, but trying to get the data warehouse developers to move on this is not going to happen.

The text writer has an option not to write the last terminator.

 

So you could write the csv with the text file writer, or alternatively write the csv, then read it in as a text file and write it out again without the last line terminator.

 

 


That does look like a good workaround, thanks!


I must admit I am not convinced this should be fixed on the FME side, but trying to get the data warehouse developers to move on this is not going to happen.

Been there got the T-shirt :-)