Table definition entries define the mapping of JSON endpoints to tables. You can specify a single entry or, in a comma separated list, multiple entries. These entries can be as simple as a colon-separated table name and endpoint pair ("<table_name>":"<endpoint>",). Or, for a greater level of configuration, entries can take the form of JSON objects.

The following demonstrates the syntax of a set of three simple table definition entries. For endpoint details and syntax, see "Query paths."

 "<table_name1>":"<endpoint1>",
 "<table_name2>":"<endpoint2>",
 "<table_name3>":"<endpoint3>"
The following demonstrates the syntax used for all the supported features and functionality.
Note: The following example demonstrates the syntax for all the features and functionality supported by the driver, but it is not typical for defining a table. In most scenarios, only a subset of these parameters would be used.
1 {
2   "<schema_name>.<table_name>": {
3      "#path":["<endpoint>"],
4      "#insert": "<method> <endpoint>",
5      "#update": "<method> <endpoint>",
6      "#delete": "<method> <endpoint>",
7      "#<paging_parameter>":"<paging_value>",
8      "#<parsing_parameter>":"<parsing_value>",
9   // The following POST entry defines two fields.You can define one or more
10  // fields in an entry. 
11      "#post":{"<field1>":"<value1>","<field2>":"<value2>"}
12  //The following HTTP header entry defines two headers. You can define one or more 
13  //headers in an entry.
14     "#headers":{"<header1>":"<value1>","<header2>":"<value2>"}
15     "<column1>":"<data_type>",
16     "<column2>":"<data_type>,#key",
17     "<column3>":"<data_type>,#readonly,
18     "<column3>":"<data_type>,#notnull,
19  //The following array defines two nested columns. You can define one or more 
20  //nested columns in an array.
21     "<column4>[]":{"<column_a>:<data_type>","<column_b>":"<data_type>"}
22  //The following key-map defines two columns. You can define one or more
23  //columns in a key map. 
24     "<column5>{<data_type>}":{"<column_c>:<data_type>","<column_d>":"<data_type>"}
25  //The following column defines two nested objects. You can define one or more
26  //nested columns in table definition. 
27     "<column6>":{"<nested_column1>":"<data_type>","<nested_column2>":"<data_type>"}
28     "<column7>":"<data_type>","<java_date_format>"
29     "<column8>":{"#type":"<data_type>","#extract:<reg_expression>"}
30     "<column9>":{"#type":"<data_type>","#header":true,"#eq":"<header_name>"}
31     "<column10>":{"#type":"<data_type>","#<operator>":"<uri_property>"}
32     }
33 }
Table 1. Components of a table definition entry
Lines Entry/Entry Type Description
2 Table name (Required) Specifies the name of the table. Optionally, you can specify the name of your schema.

For details and syntax, see Schema name.

3 #path (Required) Specifies the query path to an endpoint(s) that the driver connects to and samples. This can be a full endpoint, the path portion of an endpoint, or an array of endpoints.

For details and syntax, see Query paths.

4-6 Write operations Configures write operations for the specified endpoint values. Without these entries, the resulting relational table will be read only.

For details, see Write operations.

7 Paging parameters Configures paging behavior for the table using a set of parameters. These parameters differ based on the paging mechanisms you want to employ.

For details and syntax, see Paging.

8 Parsing parameters Configures the parsing behavior of the driver using a set of parameters. This allows the driver to accurately parse services that do not use pure REST syntax, such as legacy or proprietary services.

For details and syntax, see REST model parsing.

11 #post Defines the sample values used when issuing a POST request.

For details and syntax, see POST requests.

14 #headers Specifies the HTTP headers to filter data returned by a GET request.

For details and syntax, see Requests with custom HTTP headers.

15-30 Column definitions

Defines the name of the column and additional mapping. Column names can be literal or regular expressions. You can also configure data type mapping in these fields.

For details and syntax, see Column names and Data type mapping.
16 Primary key Designates the primary key by specifying the #key element in a column definition.

For details and syntax, see Primary key.

17-18 Column flags (read only and nullable) Designates a column as read only by specifying the #readonly element in a column definition. In addition, you can use the #notnull element to set the nullable flag for metadata purposes.

For details and syntax, see Read-only columns and Nullable columns.

21 Column as an array Defines a column as an array by specifying brackets ([]) at the end of its column name.

For details and syntax, see Columns as an array.

24 Column as key-value map Defines a column as an key-value map by specifying brackets ({}) at the end of its column name.

For details and syntax, see Columns as a key-value map.

27 Column with nested objects Defines a column with nested objects in the entry body.

For details and syntax, see Columns with nested objects.

28 Time stamp formats Defines the time stamp format for a column in the definition.

For details and syntax, see Date, time, and timestamp formats.

29 #extract Specifies a regular expression that allows you to extract a subfield, or portion, of a string value.

For details and syntax, see Subfields.

30 #header Specifies whether the column can be sent as an HTTP header instead of part of a query string for GET requests.

For details and syntax, see Columns as HTTP headers.

31 Filtering and URI parameters Specifies filtering operations to be sent in requests for the column.

For details and syntax, see Filtering and URI parameters.