About
This how-to shows you how to generate an string,varchar, text sequence with the column sequence generator.
Steps
Creation of the generator file
To generate data, you need to create a generator file that will describe the data to be generated.
The below data resource generator:
- has the name sequence_varchar–datagen.yml
- has the logical name sequence_varchar
- will generate 30 values (MaxRecordCount count)
- has a column named id that has sequence data generator that:
- starts by default at the value 1
- increments by default with the value 1
- has a column named seq_char with the varchar data type that has sequence data generator
MaxRecordCount: 30
Columns:
- name: id
type: integer
comment: A id column to see easily the number of values generated
DataGenerator:
type: sequence
- name: seq_char
type: varchar
precision: 2
comment: A column with a sequence character generator
DataGenerator:
type: sequence
Printing the data
With the data print command, we can print the values generated.
Next
Because a generator is just a data resource, you can use it in every data operation.