Element <setup>¶
Zweck: Ist die Wurzelkonfiguration und der geordnete Container eines DataMimic-Descriptors.
Warum: Verwende dieses Element genau einmal als Descriptor-Wurzel für Ausführungsdefaults und geordnete Setup-Tasks.
Beispiel¶
1 | |
Entscheidungshilfe¶
Fachlicher Nutzen: Macht Ausführungsdefaults, Client-Deklarationen und Task-Reihenfolge in einem Descriptor prüfbar.
-
Verwenden, wenn
- Beim Erstellen eines vollständig ausführbaren DATAMIMIC-Descriptors.
-
Anderen Ansatz wählen, wenn
- Beim Erstellen eines wiederverwendbaren Fragments, das ein anderer Descriptor einbindet.
-
Voraussetzungen
- Deklariere setup genau einmal als Dokumentwurzel.
-
Alternativen
- Verwende include, um wiederverwendbare Fragmente unterhalb der Wurzel zusammenzusetzen. (Siehe:
<include>)
- Verwende include, um wiederverwendbare Fragmente unterhalb der Wurzel zusammenzusetzen. (Siehe:
Vollständige Beispiele¶
Eine zustandsbehaftete Generatorinstanz registrieren und wiederverwenden
Verwende einen benannten Generator, wenn mehrere Felder oder Tasks bewusst dieselbe konfigurierte Generatorinstanz statt unabhängiger Instanzen nutzen sollen.
| named-generator/script/preflight.scr.py | |
|---|---|
1 | |
| named-generator/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 | |
Regeln und ungültige Kombinationen¶
W004 — Deprecated XML Attribute Ignored
<{element}> attribute '{attribute}' in descriptor '{descriptor}' is deprecated and ignored; execution continues. {migration}
Warum: The descriptor uses a known legacy attribute that no longer controls execution.
Lösung: Follow the migration hint when updating the model. Removing the attribute is not required to run it.
Erlaubte Elternelemente / Erlaubte Kindelemente¶
Erlaubte Elternelemente: else, else-if, if, while
Erlaubte Kindelemente:
ama-generate, assert, database, echo, execute, generate, generator, include, iterate, kafka-exporter, kafka-importer, memstore, ml-train, mongodb, object-storage, operate, param, rabbitmq-exporter, rabbitmq-importer, state-machine, variable
Zugehörige Konzepte und Anwendungsfälle¶
- Ein DSL-Vertrag — Erläutert, warum der implementierungsabgeleitete Vertrag die gemeinsame Quelle für Werkzeuge und Dokumentation ist.
- Ausdrucksauswertung und Lebensdauer — Explains the different evaluation lifetimes of literal values, cached expressions, and dynamic expressions so descriptor authors do not accidentally move runtime state into setup-time attributes.
- Erstes DATAMIMIC-Modell — Builds the smallest model and then composes preparation and generation stages.
- Modelle von DATAMIMIC 3.5 auf 4.0 umstellen — Helps existing 3.5 users identify affected models, understand the reasons for 4.0 changes, and migrate syntax and expected results without confusing retained compatibility with breakage.
- Benerator-Modelle nach DATAMIMIC migrieren — Maps Benerator concepts to the current generated grammar without freezing another support matrix.
- Ein komplexes deterministisches Modell zusammensetzen — Provides the requirement-to-model sequence for products, field dependencies, relationships, targets, and acceptance evidence.
- Determinismus, Parallelität, Paging und Distribution — Separates seed, distribution, worker policy, paging, and streaming so topology choices do not become false determinism claims.
- Modellfehler diagnostizieren — Leads XML-first users through model-loading and runtime boundaries, with DM JSON steps only for Agent Authoring workflows.
Attribute¶
Alle 14 Attribute anzeigen
clock
Clock profile for deterministic timestamps.
optional; string; Standardwert: null.
defaultDataset
Specify the default dataset locale.
optional; string; Standardwert: null.
defaultEncoding
Specify the default encoding for file operations.
optional; string; Standardwert: null.
defaultLineSeparator
Specify the default line separator.
optional; string; Standardwert: null.
defaultLocale
Specify the default locale.
optional; string; Standardwert: null.
defaultSeparator
Specify the default separator for generated data.
optional; string; Standardwert: null.
defaultSourceScripted
Enable or disable scripted sources by default.
optional; boolean; Standardwert: null.
defaultVariablePrefix
Specify the default variable prefix.
optional; string; Standardwert: null.
defaultVariableSuffix
Specify the default variable suffix.
optional; string; Standardwert: null.
multiprocessing
Beliebiger alter Parallelitäts-String; wird mit Warnung akzeptiert und ignoriert. Verwende numProcess und mpPlatform.
optional; string; Standardwert: null.
numProcess
Specify the number of processes to use.
optional; integer; Standardwert: null.
reportLogging
Enable or disable report logging.
optional; boolean; Standardwert: null.
rngSeed
Deterministic RNG seed for reproducible outputs.
optional; integer; Standardwert: null.
schemaVersion
Veraltete DSL-Version; wird mit Warnung akzeptiert und ignoriert. Die installierte Engine bestimmt die DSL-Version.
optional; string; Standardwert: null.