<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Writing a custom CSV importer]]></title><description><![CDATA[<p dir="auto">I want to write a custom CSV importer by extending the AbstractCSVDataSource and overriding the appropriate method:</p>
<pre><code class="language-java">@Override
    public void importRow(String[] row, int rowNum)
</code></pre>
<p dir="auto">My issue is that I don't know what <code>String[] row</code> will look like. There's obviously a parser that provides this but I'm not sure where to find it or whether it changes.</p>
<p dir="auto">Can anyone point me in the right direction? For now I'll just hack in a <code>System.out.println()</code> and go from what I see there.</p>
<p dir="auto">Thanks,<br />
C</p>
]]></description><link>https://forum.mango-os.com/topic/4276/writing-a-custom-csv-importer</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 01:06:46 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4276.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 Jun 2019 13:45:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Writing a custom CSV importer on Mon, 01 Jul 2019 08:35:29 GMT]]></title><description><![CDATA[<p dir="auto">Perfect, thanks for your help <a class="plugin-mentions-user plugin-mentions-a" href="/user/phildunlap" aria-label="Profile: phildunlap">@<bdi>phildunlap</bdi></a> . Much appreciated!</p>
]]></description><link>https://forum.mango-os.com/post/22572</link><guid isPermaLink="true">https://forum.mango-os.com/post/22572</guid><dc:creator><![CDATA[cbyrne]]></dc:creator><pubDate>Mon, 01 Jul 2019 08:35:29 GMT</pubDate></item><item><title><![CDATA[Reply to Writing a custom CSV importer on Thu, 27 Jun 2019 17:25:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi cbyrne,</p>
<p dir="auto">Unfortunately the Data File Data Source is in one of our private repositories, so I cannot link you to the source code directly.</p>
<p dir="auto">The parser being used is a <code>au.com.bytecode.opencsv.CSVReader.CSVReader</code> which is getting its separator, quote character, and escape character from the AbstractCSVDataSource class, unless you override the methods providing these in your implementing class, i.e.</p>
<pre><code>@Override
public char getSeparatorCharacter() {
    return ','; //split on commas
}

@Override
public char getQuoteCharacter() {
    return '"'; //unless the commas are in quote pairs
}

@Override
public char getEscapeCharacter() {
    return '\\';
}
</code></pre>
<p dir="auto">It will pass each line that it reads as it reads and parses it to the import row function.</p>
]]></description><link>https://forum.mango-os.com/post/22544</link><guid isPermaLink="true">https://forum.mango-os.com/post/22544</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Thu, 27 Jun 2019 17:25:16 GMT</pubDate></item></channel></rss>