Discussion:
Sort CSV File
(too old to reply)
w***@yahoo.com
2013-10-04 08:45:57 UTC
Permalink
Raw Message
Hi,

I always wondered how can I sort the output for the file-connector csv parser. When I write data into a csv file the order of the written work.attributes is not clear to me. Right now the only way I can think of to sort this is to read every work entry in a script, sort it and give the result back to the file connector as one complete row.
Isn't there any button to set the order without scripting ?

Thank you....
@ErikSorensen
2013-10-04 17:31:56 UTC
Permalink
Raw Message
I usually sort the source data in the way I want the .csv output (rows) to be ordered. The parser "field names" parameter will let you specify in which order the attributes (columns) should appear in the file.
a***@gmail.com
2017-04-27 16:39:16 UTC
Permalink
Raw Message
Post by w***@yahoo.com
Hi,
I always wondered how can I sort the output for the file-connector csv parser. When I write data into a csv file the order of the written work.attributes is not clear to me. Right now the only way I can think of to sort this is to read every work entry in a script, sort it and give the result back to the file connector as one complete row.
Isn't there any button to set the order without scripting ?
Thank you....
Did you ever find a way of achieving this?
Eddie Hartman
2017-04-28 06:44:04 UTC
Permalink
Raw Message
Post by a***@gmail.com
Post by w***@yahoo.com
Hi,
I always wondered how can I sort the output for the file-connector csv parser. When I write data into a csv file the order of the written work.attributes is not clear to me. Right now the only way I can think of to sort this is to read every work entry in a script, sort it and give the result back to the file connector as one complete row.
Isn't there any button to set the order without scripting ?
Thank you....
Did you ever find a way of achieving this?
As Erik states above, the Field Names parameter under the Advanced tab of the CSV Parser lets you determine the order. Just enter a field name on each line, in the order you want them from top-down.

-Eddie

Loading...