Documentation
¶
Overview ¶
migrate_yaml rewrites tuiquery example YAMLs from the legacy data.sources + data.pipelines split into the unified polymorphic shape (one data.sources map, every entry carries a `type:`).
Run:
go run scripts/migrate_yaml.go examples/*.yaml
Per-file transforms:
- For each entry in `data.pipelines:`:
- Identify the operator (from / filter / project / derive / sort / union / compose / join / cache). `from:` alone → passthrough.
- Lift the operator's sub-fields up onto the entry.
- Add `type: <op>` at the head of the entry.
- Move the entry into `data.sources:`.
- For inline `pipe:` stages on any entry:
- Convert `{filter: {where: X}}` → `{type: filter, where: X}` (same lift + type-prepend).
- For components: rename `pipeline: X` → `source: X`.
- Delete the `data.pipelines:` block entirely.
The yaml.v3 Node API preserves comments through edit + round-trip, so the rewritten files keep their headers and inline annotations.
Click to show internal directories.
Click to hide internal directories.