What are you trying to do?
Give teams moving from Tabular Editor 2/3 a migration path for the C# scripts and macros they already have: in CI (“run this script before deploy”), and from the TE community script library. This issue is about migration, not new scripting. For new automation, tx commands in a script already cover most cases (see below).
What do we do today?
What would tx do?
1. Porting guide (do first, cheap)
A docs page, “Coming from Tabular Editor scripts”:
- The common TE script patterns side by side with their
tx equivalents: set format strings, hide key columns, create time-intelligence measures, format DAX, add or rename display folders, generate measures from columns.
- A
.tx script file example run through tx interactive, and a CI example.
- Mappings for TE macros:
tx aliases and profiles.
Do this first. It shows which scripts actually need the C# runtime.
2. tx script run (C# compatibility)
tx script run fix-formats.csx
tx script run fix-formats.csx --selected "Sales/Measures/*"
- Roslyn scripting, with globals
Model and Selected modelled closely enough on TE's API that common library scripts run without changes. Measure the coverage against the TE script library and publish it.
- Scripts run against a provider-neutral object API in
Tomix.App, never raw TOM. Writes go through the normal mutation path, so the change journal, undo and --dry-run work, and in a live session a script is one transaction.
- Security: scripts are arbitrary code. They run only from a local file or stdin, never from a URL.
Acceptance criteria
- The porting guide covers at least the six patterns above, and its examples run as written against
samples/.
tx script run: an agreed set of TE community scripts runs unchanged, and a script that throws leaves the model unchanged.
Out of scope
- A new scripting DSL or batch file format:
tx interactive with a script of tx commands already does this.
- TE2 command-line flag compatibility.
What are you trying to do?
Give teams moving from Tabular Editor 2/3 a migration path for the C# scripts and macros they already have: in CI (“run this script before deploy”), and from the TE community script library. This issue is about migration, not new scripting. For new automation,
txcommands in a script already cover most cases (see below).What do we do today?
tx interactive < changes.tx(feat(cli): tx interactive (alias tx shell), the live session REPL #347) runs a file of ordinarytxcommands against one live session. The model loads once,begin/commitmake the batch all-or-nothing, it undoes as one step, and batch mode stops at the first failure. Shell scripts withls/find --paths-onlypiped intoadd/set/mv/rm/replacecover the rest.What would tx do?
1. Porting guide (do first, cheap)
A docs page, “Coming from Tabular Editor scripts”:
txequivalents: set format strings, hide key columns, create time-intelligence measures, format DAX, add or rename display folders, generate measures from columns..txscript file example run throughtx interactive, and a CI example.txaliases and profiles.Do this first. It shows which scripts actually need the C# runtime.
2.
tx script run(C# compatibility)tx script run fix-formats.csx tx script run fix-formats.csx --selected "Sales/Measures/*"ModelandSelectedmodelled closely enough on TE's API that common library scripts run without changes. Measure the coverage against the TE script library and publish it.Tomix.App, never raw TOM. Writes go through the normal mutation path, so the change journal, undo and--dry-runwork, and in a live session a script is one transaction.Acceptance criteria
samples/.tx script run: an agreed set of TE community scripts runs unchanged, and a script that throws leaves the model unchanged.Out of scope
tx interactivewith a script oftxcommands already does this.