A expression generator is a column data generator that can generate data created from:
columns:
- name: columnName
DataGenerator:
type: expression
ColumnParents:
- columnParentName1 # variable x
- columnParentName2 # variable y
- ...... # variable "z", "a", "b", "c", "d","e","f"
expression: "javascriptExpression" # See below for example
Mandatory Key | Description |
---|---|
ColumnParents | The column generator used in the expression |
expression | The expression in javascript where the parents columns maps by order to the following variables “x”, “y”, “z”, “a”, “b”, “c”, “d”,“e”, “f” |
When creating an expression generator, you may want to create columns that should not appear in the data generated. For this purpose, you can use the hidden property.
Example:
- name: columnToHide
Hidden: true # The column will not be added to the output.
Description: An hidden column
DataGenerator:
type: entity
This section is showing snippet of expression (Javascript).
x.getMonth()+1 // Month
var monthNames = ['Jan', 'Feb', 'Maa', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'];
monthNames[x.getMonth()]
x.getFullYear()
Email String concatenation where:
x+'@'+y+'.'+z
The below data type are supported:
Data Type |
---|
Integer |
Float |
Double |
Numeric |
Decimal |
Date |
Timestamp |
Varchar |