Hello,
I am trying to encapsulate the data in CSV file by double quotes with
CSVStrategy Configuration. But the data in the CSV is not encapsulated by
double quotes. The code snippet is as below,
    public void configure() throws Exception {
        CsvDataFormat format = new CsvDataFormat();
        format.setStrategy(new CSVStrategy(',', '"', '#'));

        from(TEST)
            .to("sql:" + TEST_SQL+ "?dataSource=#dataSource")
            .process(new TestProcessor())
            .setHeader(FILE_NAME, "Test.csv")
            .setBody(simple("${body}"))
            .marshal(format)
            .convertBodyTo(String.class)
            .to("file:?tempFileName=${file:onlyname.noext}.tmp")
    }

@Experts: Please let me know whether I am missing something here?

Thanks in advance!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Encapsulate-each-field-by-double-quotes-tp5742070.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to