Zum Inhalt

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
<operate source="operate/customer_cleanup.opctl.csv"/>

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>)

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
id|template|op1
customer-cleanup|templates/customer.template.xml|set(//customer/status,de-identified)
operate-dataset/templates/customer.template.xml
1
2
3
4
<customer>
    <id>C-100</id>
    <status>pending</status>
</customer>
operate-dataset/datamimic.xml
1
2
3
4
5
6
7
<setup defaultSeparator="|">
    <operate source="data/customer-cleanup.opctl.csv"
             operation_prefix="op"
             template_not_found_action="error"
             operation_not_matched_action="error"
             export_strategy="local"/>
</setup>

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.

Vollständige Regel

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.

Vollständige Regel

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.

Vollständige Regel

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.