Element <operate>¶
Zweck: Wendet geprüfte Operation-Control-Zeilen auf XML- oder JSON-Templates an und erzeugt Artefakte.
Warum: Verwende dieses Element, wenn ein descriptor-gesteuerter Operation-Control-Workflow konkrete Template-Mutationen nachvollziehbar ausführen soll.
Beispiel¶
1 | |
Entscheidungshilfe¶
Fachlicher Nutzen: Macht destruktive oder mutierende Datenoperationen explizit, prüfbar und policy-gesteuert.
-
Verwenden, wenn
- Beim Anwenden eines geprüften Operation-Control-Datensatzes auf vorhandene Zieldaten.
-
Anderen Ansatz wählen, wenn
- Beim Erzeugen eines neuen Datensatzes, Kopieren von Quellzeilen oder impliziter Bereinigung.
-
Voraussetzungen
- Liefere Operation-Mappings, eine unterstützte Zielstrategie und bewussten Selector-Scope.
- Jede nichtleere Control-Zeile benötigt template mit der Endung .xml oder .json; Groß- und Kleinschreibung der Endung ist egal.
-
Alternativen
- Verwende generate zum Erzeugen oder Transformieren ohne Operation-Control-Workflow. (Siehe:
<generate>)
- Verwende generate zum Erzeugen oder Transformieren ohne Operation-Control-Workflow. (Siehe:
Vollständige Beispiele¶
Ein XML-Artefakt aus einem geprüften Operation-Control-Dataset zusammenstellen
Verwende operate, wenn geprüfte Control-Zeilen explizite Template-Mutationen anwenden müssen, bevor ein XML- oder JSON-Artefakt ausgeliefert wird.
| operate-dataset/data/customer-cleanup.opctl.csv | |
|---|---|
1 2 | |
| operate-dataset/templates/customer.template.xml | |
|---|---|
1 2 3 4 | |
| operate-dataset/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.
I950 — Operate Control Template Missing
Operate control CSV '{csv_path}' has no non-blank template value in row(s): {rows}
Warum: Each non-blank control row needs a template reference before operations can be applied.
Lösung: Set the 'template' column for every control row or remove the malformed row.
I951 — Operate Template Format Unsupported
Operate template '{template}' has unsupported suffix '{suffix}'; supported suffixes: {supported}
Warum: The operate executor has format-specific XML and JSON implementations only.
Lösung: Use an .xml or .json template file.
Erlaubte Elternelemente / Erlaubte Kindelemente¶
Erlaubte Elternelemente: else, else-if, if, setup, while
Erlaubte Kindelemente:
Keine
Attribute¶
Alle 6 Attribute anzeigen
export_strategy
Artifact destination: local writes beside the descriptor; minio requires one configured MinIO client.
optional; string; Standardwert: "local"; Werte: local, minio.
operation_not_matched_action
Action when operation is not matched.
optional; string; Standardwert: "warn"; Werte: warn, ignore, error.
operation_prefix
Prefix for operation commands.
optional; string; Standardwert: "op".
source
Source file for operation control; each non-empty row must name a .xml or .json template.
erforderlich; string.
template-dir
Veralteter Template-Pfad; wird mit Warnung akzeptiert und ignoriert. Template-Referenzen gehören in die Steuerzeilen.
optional; string; Standardwert: null.
template_not_found_action
Action when template is not found.
optional; string; Standardwert: "warn"; Werte: warn, ignore, error.