This how-to shows you how to generate a sequence based on provided values with the column sequence generator.
This page demonstrate the values and reset property of the column sequence generator.
The sequence will be created with a list of colors.
To generate data, you need to create a generator file that will describe the data to be generated.
The below data resource generator:
MaxRecordCount: 10
Columns:
- name: id
type: integer
comment: A id column to see easily the number of values generated
DataGenerator:
type: sequence
- name: seq_color
type: varchar
comment: A column with a color sequence date generator
DataGenerator:
type: sequence
# when the last color has been given (black), restart from the first element (blue)
reset: true
# the list of values returned in sequence
values:
- blue
- red
- green
- cyan
- magenta
- yellow
- black
With the data print command, we can print the values generated.
Because a generator is just a data resource, you can use it in every data operation.