CSV data source is used to fetch data from CSV (character
separated values) files. CSV is a simple format for tabular data.
Many spreadsheet programs, databases, and other applications can
export their data in CSV. Common separator characters are comma,
tabulator and space.
Setup
No special setup is needed, but the file must be readable
(i.e. its' location must be known and it must have proper
permissions).
Configuration
To ensure maximum compatability the CSVDataSource can be configured
with the following parameters:
commentChar - Rows starting with commentChar will
be ignored.
firstDataRow - Row number of the first data row. Used
when there are non-data rows at the beginning of the file without
commentChar.
quotationChar - Text between two quotation characters is
kept together even if there are separator characters.
namesRow - The row number for column names row. Column
names must be separated like data values.
nullMarker - A string used to indicate a mising
value.
separatorChar - A character separating values on rows
(default is space).
Examples
Simple example. Takes all the columns in the CSV file.
<data>
<csv source="mytest.csv" />
</data>
Euribor* interest rates, read from a CSV file.
*Euribor (Euro Interbank Offered Rate) is the rate
at which euro interbank term deposits within the euro zone are offered
by one prime bank to another prime bank.