Description
The Database off-the-shelf (OTS) adaptor configuration includes a Domain to Data Source Mapping page for mapping source-system fields (e.g. database columns) to data domain version properties.
To avoid manually entering the Data Source Properties a user can upload a JSON file. The process of uploading the file and format of the JSON file are described below.
Steps
-
From the
Domain to data source mappingpage, Upload a JSON file (seeJSON File Formatsection) by select on theUPLOAD JSONbutton. -
After uploading the JSON file, the data source properties will properties will appear on the right side.
-
The
Domain Version Propertiesand theData Source Propertiescan be dragged up and down the list -
Between them is the link icon button used to link the domain version properties to the source-system fields.
-
When selecting the link icon, the domain version property will link/unlink with the data source property (typically a column in the database table).
-
The type of the data source property and other metdata can be viewed/edited by expanding it.
-
JSON File Format
The JSON file contains a single table array. Each array element represents a data source property typically, a database column. Each object (e.g. column definition) in the array must have the following properties:
| Property | Description |
|---|---|
column |
Column name in the data source. Typically, a database column name. |
internal-type |
The column’s database type e.g. varchar(255), int8, numeric(10,2) etc. |
db-adaptor-type |
The db-adaptor-type should be the Java type needed for configuring the db-adaptor such as STRING, LONG, DOUBLE, DATE, TIMESTAMP, LOCAL_DATE or LOCAL_TIME. |
domain-property-type |
A YOUnite Data Domain Type such as STRING, NUMBER, INTEGER or BOOLEAN etc. See Data Domains: Model Schema. |
primary-key |
Set to |
required |
Set to ‘true’ if the data source property is required (e.g. column cannot be null) otherwise set to |
Example
{
"table": [
{
"column": "id",
"internal-type": "varchar(64)",
"db-adaptor-type": "STRING",
"domain-property-type": "STRING",
"primary-key": true,
"required": true
},
{
"column": "email",
"internal-type": "varchar(255)",
"db-adaptor-type": "STRING",
"domain-property-type": "STRING",
"primary-key": false,
"required": true
},
{
"column": "salesrep-id",
"internal-type": "int8",
"db-adaptor-type": "LONG",
"domain-property-type": "INTEGER",
"primary-key": false,
"required": false
}
]
}