skip to main content
Input REST file syntax : Table definition entries : Columns as an array
  

Try DataDirect Drivers Now

Columns as an array

A column is defined as an array by ending the column name in brackets ([]). When mapping a column with an array to the relational model, the driver normalizes the column to a child table. The driver also supports arrays nested in arrays. When generating the relational view, the driver normalizes the nested array to child table.
A column as an array takes the following form for defining two nested columns. You can define one or more nested columns in an array.
"<column>[]":{"<array_column_a>":"<data_type>","<array_column_b>":"<data_type>"}
column_name
is the name of the column name that contains the nested object.
array_column
specifies the name of the column in an array.
data_type
specifies the data type mapping for the corresponding column.
For example:
"income[]":{"month":"string","amount":"decimal(18.2)"}