BES - Modules - CSV Handler: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
Line 13: Line 13:


===== Supported OpenDAP datatypes =====
===== Supported OpenDAP datatypes =====
The CSV handler supports all of the DAP2 simple types: Byte, Int16, UInt16, Int32, UInt32, Float32, Float64, String, and Url.
The CSV handler supports the following DAP2 simple types: Int16, Int32, Float32, Float64, String.


===== Dataset representation =====
===== Dataset representation =====

Revision as of 22:16, 1 May 2015

Kinds of files the handler will serve

This handler will serve Comma-Separated Values type data. Form many kinds of files, only very modifications to the data files are needed. If you have very complex ASCII data (e.g., data with headers), take a look at the FreeForm handler, too.

Data file configuration

Given a simple CSV data file, such as would be written out by Excel, add a single line at the start that provides a name and OpenDAP datatype for each column. Just as the data values in a given row are separated by a comma, so are the column names and types. Here is a small example data file with the added name<type> configuration row.

"Station<String>","latitude<Float32>","longitude<Float32>","temperature_K<Float32>","Notes<String>"
"CMWM",-34.7,23.7,264.3,
"BWWJ",-34.2,21.5,262.1,"Foo"
"CWQK",-32.7,22.3,268.4,
"CRLM",-33.8,22.1,270.2,"Blah"
"FOOB",-32.9,23.4,269.69,"FOOBAR"
Supported OpenDAP datatypes

The CSV handler supports the following DAP2 simple types: Int16, Int32, Float32, Float64, String.

Dataset representation

The CSV handler will return represent the columns in the dataset as arrays with the named dimension record. For example, the sample data shown above will be represented in DAP2 by this handler as:

Dataset {
    String Station[record = 5];
    Float32 latitude[record = 5];
    Float32 longitude[record = 5];
    Float32 temperature_K[record = 5];
    String Notes[record = 5];
} temperature.csv;

This is in contrast to the FreeForm handler that would represent these data as a Sequence with five columns.

Known problems

There are no known problems.

Configuration parameters

Configuring the handler

Configuring Datasets