Data Generator

Data GeneratorA data generator is a collection of fields organized into a tree structure. Each field is associated to a generation rule and when the generation rule accepts inputs from other fields these are children in the tree structure.

Data Generator

Generators are made of fields

Designing a generator is matter of identify all the fields, their generation rules and their relationships / dependencies. There will be at least as many fields in a generator as fields in the final file. But there can be more. Indeed, building a data generator is also matter of combining rules and sharing data between fields.

Fields produce data from generation rules

Each field of a generator is associated to a generation rule, that is a piece of code implementing a way of creating data out of the box or by processing input data provided by other fields.

Designing Data Generator

Adding Fields to a Generator

You can add a field as new root of the generator or as a new child of a parent field that accepts a new child (such as the Concatenate rule for example). To add a new root field to generator first click on the generator then client on the new field button.

Default generation rule is the Constant rule.

If the selected item in the design explorer is a field when you click the "add field" button, then the new field will be added to the selected field if it accepts children or to the parent field if it accepts more children.

Ordering Fields in a Generator

Even if the order of the field in a generator doesn't realy matter it is sometimes convenient to reorder them to have a better presentation of the generator. You can use the context menu of the design explorer to move up and down a field in its parent.

When producing the data, the generation engine will reorder generation field to take into account dependencies between the fields. For example, if field 'A' appears before field 'B' but field 'B' consume data from 'A' then B will be updated before A. This is automatically done and you don't have to take care.

Sometimes, advanced user uses dynamic dependencies which foolish the automatic dependency checking. It that case you have to reorder field manually since order of independent fields are preserved by the generation engine.

Changing the generation rule of a field

When you create a new field GEDIS Studio creates a field of type Constant. To change the generation rule you have to select the field and then go to the "Rules" tab and double click on the rows matching the rule you want for the field.

Generator Fields and Output Format

The structure of the generator (number of fields, root fields, ordering, etc.) doesn't force an output format of the files that will be generated with that generator.

Each field of a generator may or may not be included in a generated data file in an different order than the one of generator. See Output Formatters.

Add comment

Security code