[Non-API] Flat file data source provider - an ODA run-time extension.

Note: The implementation classes are not public APIs.
Backward compatibility support in future releases is not guaranteed.

Package Specification

The ODA flat file driver serves as an exemplary implementation of the ODA run-time interfaces. It performs basic data source provider functionalities including:

Consuming the ODA flat file driver

Data store format

The flat file ODA driver expects that both meta-data (including column names and data types) and data are kept in a single flat file. The first line of a flat file specifies data column names. The second line may optionally specify the column data types. The remaining portion of the file contains data.

Redundant Spaces

Redundant spaces are allowed in a flat file, but will be trimmed once processed by the flat file driver.

Double Quotes

Double Quotes can be used in a flat file for the purpose of clarity. The quotes, however, will be trimmed once processed by the driver. That is, a line in flat file like is processed to be the same as the following line: A comma within a pair of double quotes would not be treated as separator. For example, contains a single column value. It is not considered the same as the following line: because the second case is processed to contain three columnn values, i.e. "I'm", "however", and "a really normal String".

Null Values

Null values are allowed. They are presented as blanks, and are comma-separated from other data. A flat file that contains only one column, and all the data is of null value will be treated as an empty table.

Data Types

Flat file driver currently supports the following data types:
INT, DOUBLE, STRING, DATE, TIME, TIMESTAMP and BIGDECIMAL.
Support for BLOB and CLOB data types will be added in future. The driver's data type codes are defined as follows:

SQL-like Query Syntax

The flat file driver supports limited SQL-like query syntax. The supported syntax is:
(those in square brackets are optional): The query text is case in-sensitive and allows redundant spaces. The flat file driver does not support multiple tables in the FROM clause. For example, a table is named "employee.csv" with columns "Id", "Name" and "HireDate", the following queries are valid: However, the following queries are invalid:

Advanced SOL-like query-text is also defined, and it can be used in the dataset design, for detailed information please refer to "org.eclipse.datatolls.connectivity.oda.flatfile.util.querytextutil.package.html"

@since 3.0