A data definition is a serie of properties in yaml format that defines the data structure and attributes of a a data resource.
If you have a file with the logical name foo, you may defined its data definition by creating the yaml file foo–datadef.yml in the same directory.
The define operation uses this format to define inline data resources.
The resource generator uses this format to define the data generated and their parameters.
The following data definition file shows the common structure of all data definition file that defines the name of the tabular structure and its columns.
LogicalName: LogicalName
PrimaryColumns: [ "column_name1", "column_name2" ]
Columns:
- name: column_name1
Type:
Precision:
Scale:
Comment:
Position: 1
- name: column_name2
Type:
Precision:
Scale:
Comment:
.....
Request:
header: X-HTTP-header
Accept: ...
where:
Example:
LogicalName: Date
Columns:
- name: DATE_ID
Type: Date
- name: MONTH_ID
Type: Varchar
Precision: 6
- name: MONTH_NUMBER
Type: Integer
- name: MONTH_NAME
Type: Varchar
Precision: 20
- name: MONTH_DESC
Type: Varchar
Precision: 20
- name: MONTH_DESC_SHORT
Type: Varchar
Precision: 10
- name: YEAR_NUMBER
Type: Varchar
Precision: 4
Each action may need additional information about a table or a column. This information can be added at each level (table or column) as a attribute (ie property).
DataResourceAttribute1: value1
Columns:
- name: column_name
ColumnProperty1: value1
....
where:
A Property value may be:
The column data generators use them to define data generations arguments.