Data360 Analyze

 View Only
  • 1.  Export to csv issue with spaces

    Posted 02-03-2021 09:13

    in LAE (and the imported to D360 version) when I am exporting to a csv, i have 3 spaces in the last field... but i am doing this differently..

    Since my csv file has a footer row that is different fields, I am building each row as 1 field then sending that to the csv out node.

    LINEOUT="1,2,3,4,   "

    in the old superseded node, it works fine.. the file has the 3 spaces at the end (in the last field)

    the new node doesnt.. it trims off the 3 spaces?

    if I add another ,

    LINEOUT="1,2,3,4,   ,"

    it shows.. but without that, they are removed. Help!

     



  • 2.  RE: Export to csv issue with spaces

    Employee
    Posted 02-03-2021 15:18

    The Output csv/delimited node trims excess trailing and leading spaces per field. Since your LINEOUT variable is acting as a single field, adding the extra comma to the end "protects" the spaces from getting trimmed. 

    While testing this internally, I also noticed that the Output csv/delimited node uses RFC-4180 as its default csv definition. RFC-4180 says trailing and leading spaces shouldn't be trimmed, so I'll check internally on this too, but in the meantime, if you're able to add any extra character after the spaces, that will keep the spaces in-tact.



  • 3.  RE: Export to csv issue with spaces

    Posted 02-03-2021 15:25

    for the moment, i have added quotes... "   " thanks for checking on it, It would be nice if it acted the way the LAE version did so in the event the spaces are truly needed, it will leave them

     

    Thanks!



  • 4.  RE: Export to csv issue with spaces

    Employee
    Posted 02-04-2021 02:40

    We have created a development request to modify the node to allow surrounding white space characters to be retained or trimmed from values when writing the data