Writing a csv file has incorrect header quoting

10 views
Skip to first unread message

Peter Kempkers

unread,
Nov 2, 2021, 11:49:42 PM11/2/21
to Scriptella ETL
I'm using the following script:

<!DOCTYPE etl SYSTEM "http://scriptella.org/dtd/etl.dtd">
<etl>

<connection id="in" driver="csv" url="/home/peter/scriptella/scriptella-1.2/report.csv">
    separator=;
    quote='
</connection>

<connection id="out" driver="csv" url="/home/peter/scriptella/scriptella-1.2/report2.csv">
    separator=;
    quote='
</connection>

<script connection-id="out">
    Name; Age
</script>

<query connection-id="in">
    <!--Empty query means select all-->
    <script connection-id="out">
        $name,$age
    </script>
</query>
</etl>

The results look like this

$ sdiff -s report.csv report2.csv
'ID';'Name';'Age'                                         | 'Name; Age'
'1';'Peter';'62'                                              | 'Peter';'62'

So the header is quoting the whole header not the individual fields i.e. 'Name';'Age'

Am I missing something? From my experience the fulling quote header is not correct, and it also doesn't load using Scriptella.

Can this be fixed or is there a work around?

Thanks
Peter
Reply all
Reply to author
Forward
0 new messages