Appboard/2.4/builder/data sources/file: Difference between revisions

imported>Jason.nicholls
imported>Jason.nicholls
Line 44: Line 44:
A ''Header Meta Delimiter'' must be configured for AppBoard to separate out the actual field name from the meta information, for example using an asterisk meta delimiter, and a comma data delimiter:
A ''Header Meta Delimiter'' must be configured for AppBoard to separate out the actual field name from the meta information, for example using an asterisk meta delimiter, and a comma data delimiter:


<pre>Name'''*STRING*PK''',Description'''*STRING''',Total'''*NUMBER''',LastUpdate'''*DATE*yyyy-MM-dd'''</pre>
<tt>Name'''*STRING*PK''',Description'''*STRING''',Total'''*NUMBER''',LastUpdate'''*DATE*yyyy-MM-dd'''
ExampleRow,Description Here,123,2013-06-24</tt>
 
 
The data types are the same as within AppBoard; <tt>BOOLEAN</tt>, <tt>NUMBER</tt>, <tt>LONG</tt>, <tt>INT</tt>, <tt>STRING</tt>, and <tt>DATE</tt>. In addition to the type, one or more fields can set the <tt>PK</tt> flag to indicate that particular field is a primary key. The <tt>DATE</tt> type also allows for the source date formatting to be defined using the same notation as within AppBoard


=== XLS File & Directory ===
=== XLS File & Directory ===


=== Shell Command ===
=== Shell Command ===

Revision as of 08:09, 19 September 2013


File based data adapters allow AppBoard to consume data from any files the server process has permissions to read, including network mounted filesystems.

The Shell Command adapter is a special case where AppBoard actually executes the specified command and then captures the response.


CSV File & Directory

Configuration Options:

Option Description
Directory Only applicable to the CSV Directory data adapter and defines the path containing the files to be read.
File Extension Only applicable to the CSV Directory data adapter and defines the set of files AppBoard will look for in the defined directory, e.g. *.csv
File Path Only applicable to the CSV File data adapter and defines the specific path and filename of the file to be read.
Data Delimiter Defines the field separator which is comma by default, but can be set to semi-colons, spaces, or tabs.
Contains Header Line Defines whether the file contains a header line, which should be the first row in the file. If no header is present the first row will also be used to define the field names.
Header Meta Delimiter See below for a further information on header meta data. This option specifies the meta delimiter used for each field to separate the actual field name from meta information. By default this is disabled but can be set to asterisk (*) or hash (#)
String Boundaries For files that contain strings which could potentially include the data delimiter character the fields need to be further grouped by quotes so the parser doesn't incorrectly split the field. Typically this should be set to Delimited by Quotes even in the case quotes aren't used as this still behaves as expected. Setting this to Not Delimited will specifically ignore quotes and split on every data delimiter found.

Header Meta Data

While it's simple to incorporate CSV data into AppBoard using the CSV data adapters, CSV files themselves do not define the data types of the columns. While this may be inferred AppBoard does not attempt to do this and the administrator needs to configure the types appropriately on the Explore step of the Data Source Wizard.

Starting with AppBoard 2.4 meta information describing the column types and primary keys can be encoded into the header line, removing the need to manually set the types and keys.

A Header Meta Delimiter must be configured for AppBoard to separate out the actual field name from the meta information, for example using an asterisk meta delimiter, and a comma data delimiter:

Name*STRING*PK,Description*STRING,Total*NUMBER,LastUpdate*DATE*yyyy-MM-dd

ExampleRow,Description Here,123,2013-06-24


The data types are the same as within AppBoard; BOOLEAN, NUMBER, LONG, INT, STRING, and DATE. In addition to the type, one or more fields can set the PK flag to indicate that particular field is a primary key. The DATE type also allows for the source date formatting to be defined using the same notation as within AppBoard

XLS File & Directory

Shell Command