First DATAMIMIC Model¶
Every DATAMIMIC XML descriptor has a <setup> root. The smallest useful model generates records, defines their keys, and sends them to a target.
| minimal.xml | |
|---|---|
1 2 3 4 5 | |
It creates ten rows in output.csv:
1 2 3 4 5 6 7 8 9 10 11 | |
Split a model into reusable stages¶
A project can load properties, prepare source data in memory, and generate final records from separate descriptors.
| conf/base.properties | |
|---|---|
1 | |
| data/car.ent.csv | |
|---|---|
1 2 3 4 | |
| datamimic.xml | |
|---|---|
1 2 3 4 5 | |
<include> composes the project files in document order. The preparation stage writes directly to the in-memory mem target.
| 1_prepare.xml | |
|---|---|
1 2 3 | |
<generate> reads the source records and writes them to the declared target without inventing additional rows. The stored entity CARS can then be used by a later variable.
| 2_generate.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
This stage demonstrates the core composition pattern:
<generate>owns record count, source semantics, and target.<variable>evaluates reusable source, entity, generator, or script values once per record.<key>writes fields to the generated record.cyclic="true"explicitly permits a finite source to be reused when more output records are requested.
Start with explicit values, then move shared counts and connection identifiers into properties. For nested records, use the variable-scoping guide.
Hosted Platform workflow¶
Creating projects, starting tasks, inspecting previews and downloading artifacts are Platform concerns. Continue with First steps in the Platform after the descriptor is valid.