OMS can use data in CSV format for tabular input and output. There are some assumptions about the structure of an OMS CSV file in order to use it for data reading/writing.
A table is stored as an ASCII file using the CSV standard. The file has the extension .csv. The content is stored as comma separated values. Tables may have comment lines, which start with the pound symbol # in the first column. Empty lines are allowed anywere in a table and get ignored. Tables consists of columns and rows, and optional table meta data. Columns may have a type and optional meta data. Meta data is organized as pair key, value.
A table requires two key words, @table and @header. The @table keyword tags the start of a table definition, the @header tag starts a column
definition. Both tags are case insensitive.
Tables can be generated using any text editor. Spreadsheet tools usually do allow the export into a CSV file.
The table header, indicated by @Table, followed by the name of the table. The next lines may have table level meta data, one meta data entry per line. Meta data is optional.
The table header is followed by the column header, indicated by the @Header keyword. Next to this all
the column names are listed. The next lines may contain column meta data, starting with the key, followed by
the values for each column (Example above shows Type and Format for the columns).
Data rows start with a ',' as the first character; values are comma separated.
A minimal table with no optional meta data looks like this:
@table, example data table
@header a, b, c
... more data
Such a table even looks O.K. when opened in Excel
The are the follwing types available:
If no Type information is given, the assumed type is String.
Data in each column has to have a Type and may have a Format.
If a column has the type date, it is required to have a Format
meta data record. The Format information is being used by OMS either
to parse the file is used as input, or it was used to write it out. For numerical data
the format is optional if the data values can be parsed with no problems (means: no
Format Patterns according to Sun's specification must be used: