# `te` gotchas Sharp edges and non-obvious behavior. Companion to the te-cli skill (SKILL.md). Each entry: what you see (the tell), then the fix. ## Gotchas ### Syntax that no longer exists - **`-q` / `-i` are gone**. Tell: `Error: Unrecognized option '-q'.` followed by `Unrecognized command or argument ''`. Fix: `te set -p Name=Value` (repeatable, or bare `Name=Value` after the path), `te get -p `, `te add -t Measure -p Expression="..."`. Same on `te macro set` and `te bpa rules set`. - **Trailing model path is rejected**. Tell: `Error: Unrecognized command or argument './model'.` Fix: the model is only ever `--model`/`-m` (or `-s`/`-d`, `--local`, `--recent`, or the active `te connect`). `te deploy ./model` → `te deploy --model ./model`. - **Removed commands** (`te load`, `te open`, `te replace`, `te format`, `te incremental-refresh`, `te migrate`). Tell: `Error: Unrecognized command or argument 'format'.` Fix: `te get .` for the summary `load` printed; `te script` for bulk rewrites instead of `replace`; `te set --format ` / `te util format-dax` / `te util format-m` instead of `format`; `te get|set /RefreshPolicy` instead of `incremental-refresh`; `te util migrate`. - **`te script` source flags are `--file` and `--inline` only**. `--script`, `-S`, `--expression`, `-e` and `--dry-run` fail as unrecognized options. A bare positional must be an existing `.cs`/`.csx` file; `--validate` compiles without a model. - **`te bpa run --vpa-rules` is gone** and the six `VPA_*` rules are not built-ins. Tell: `Error: Unrecognized option '--vpa-rules'.` Fix: copy the rule definition into your own rules file (`--rules` / `bpa.rules`) and feed statistics with `--vpax `. - **`--save` only means "persist this mutation"**. Tell: `Error: Unrecognized option '--save'.` on `te test snapshot`, `te vertipaq` or `te auth login`. Fix: `te test snapshot --output-file ` (`-o`); `te vertipaq --annotate --push`; drop `--save=false` from `te auth login` and use `--auth env` with `AZURE_CLIENT_*` variables when the secret must not be cached. - **`te util` never loads a model**. Tell: `Error: Unrecognized option '--model'.` with a hint. Fix: `te set --format ` for an expression stored in a model; `te util format-dax` only for loose text. ### Path & property-name asymmetries - **A partition's body is `Expression` on every command**. `te get
/Partitions/

-p Expression`, `te set ... -p Expression="" --save`, `te add -t MPartition -p Expression=` and `--format Expression` all address the same property on any partition kind; `MExpression` and `Query` remain accepted aliases for older scripts. - **Unknown property name? Ask the object.** Tell: `Property 'Foo' not found on Measure.` followed by a `Hint:` naming `te get --properties`. Fix: run that command; it lists every name `-p` accepts with type, writability and allowed values (`--all` adds internal ones). Both spellings work where they differ (`Hidden` / `IsHidden`). - **`-p Name=null` clears text properties too, and piped `null` is literal**. `te set X -p Description=null` (or `--unset Description`) clears; `echo null | te set X -p Description=-` stores the four characters `null`. Numbers, booleans and enums cannot be cleared and are refused. - **`{ } * ?` are reserved in paths**. Tell: `'{' at position 7 is reserved for future brace expansion. Quote the segment to use it literally: '{foo}' or "{foo}".` Fix: quote the segment, single quotes in table position, double quotes for a child: `te get "Tables/'{foo}'"`, `te get 'Sales/"my*name"'`. cmd.exe cannot express the mixed quotes; use PowerShell or bash. - **`KPIs` and `Sets` are container keywords**. `te list KPIs` lists KPIs, not a table named `KPIs`; `te list Sales/Sets` lists calculated sets, not a measure named `Sets`. Fix: quote the literal name in filter paths: `te list "'KPIs'"`, `te list 'Sales/"Sets"'`. In object paths (`te get`/`te set`/...) a *table* named `KPIs` or `Sets` still resolves bare; a measure or column named `Sets` under a table must be double-quoted. - **Relationships are addressed as `Relationships/{guid}`**. `te list Relationships --paths-only` prints GUID paths; the `Name` property is a display string (`'Customers'[Station] ∞←1 'Regions'[Station]`), which `te get` also accepts but which is awkward to type. Paste the GUID form. For a readable overview against a deployed model: `te query "EVALUATE INFO.VIEW.RELATIONSHIPS()"`. - **Object paths use `/` as separator**, not `\` or `.`. Quote names with spaces: `"Sales 2024/Revenue"`, `"_Measures/Total Revenue"`, `"Date/Date Hierarchy/Year"`. Every path the CLI prints (errors, `--paths-only`, `objectPath` in JSON) is already quoted and pastes back. - **`-t` means two different things**. On `te get`/`set`/`remove`/`move`/`deps` it disambiguates a path (column vs hierarchy of the same name) and a mismatch is not an error: `te get Orders -t Measure` silently returns the table. On `te list`, `te get --ls` and `te get --where` it filters the result to that kind. ### Object types and creation - **`-t DataColumn` needs both `SourceColumn` and `DataType`**. Tell: `Error: -t DataColumn needs an explicit data type: -p DataType=.` Fix: `te add Sales/Qty -t DataColumn -p SourceColumn=Qty -p DataType=Int64 --save`, or `te set Sales --update-schema --save` to detect types from the source. Refused on calculated tables and calculation groups. - **`-p` on `te add -t Table` targets the table, not the partition**. Tell: `Warning: Skipped unknown property 'Query': Property 'Query' not found on Table.` Fix: only `-p Expression=...` (or `--partition-expression`) reaches the new partition; use `--source-type query|m` to pick the partition kind. - **Workflow ordering; relationships before measures**: measures that use `RELATED()` or cross-table `CALCULATE()` are validated at save time. If the relationship does not exist yet, the save gate rejects with `DAX0002: Column ''[] doesn't have a relationship to any table available in the current context`. Add relationships first. If that order is impossible, use `--force` only as a last resort and run `te validate` immediately after. - **`te remove` on the last partition fails, but `--dry-run` does not warn**. `te remove Sales/Partitions/Sales --dry-run` prints `Would remove: Partition 'Sales/Partitions/Sales'`; the real (in-memory or `--save`) run errors with `Cannot remove last partition from table 'Sales'`. Add a replacement partition first (`te add Sales/Partitions/New -t MPartition -p Expression=""`), then remove. - **Single-object perspective membership is not addressable**. `te add "Perspectives/P/Sales"` adds a whole table, but `te add "Perspectives/P/Sales/Revenue"` fails (`Type is required` / `could not be resolved` with `-t`). Fix: `te script --inline 'Model.Tables["Sales"].Measures["Revenue"].InPerspective["P"] = true;' --save`. - **Translation for a missing culture is a silent no-op**. `te set Sales/Revenue -p "TranslatedNames[fr-FR]=Revenu"` on a model without `fr-FR` prints `No changes.` and exits 0. Fix: `te add Cultures/fr-FR -t Culture --save` first. - **`te set

--format Expression` reaches nothing**. Tell: `Cannot format non-expression property 'Expression' on Table. Formattable properties: DefaultDetailRowsExpression.` A table holds no expression; name the partition: `te set Sales/Partitions/Sales --format Expression --save`. - **Silent M syntax errors during partition authoring**: a typo in the partition M (unbalanced braces, an unquoted token) does not always raise at save time. After creating a data-bound table, sanity-check with `te get
/Partitions/
-p Expression` and `-p sourceType` (`M`). - **`te move` refuses names that are not yours to set**. Renaming a relationship (its name always describes the columns it joins), a measure's KPI or a role's table permission exits non-zero with an explanation instead of printing `No changes.` - **`--semicolons` is an input dialect, and it lives only on `te util format-dax`**. It makes the formatter *read* semicolons as list separators as well as write them, so comma-separated DAX fails with `Syntax error near ,`. `te set --format --semicolons` is refused outright: stored DAX is always comma-separated. `formatOptions.useSemicolons` no longer exists (`te config set` rejects it as an unknown key). ### Output shapes - **Findings JSON is one shape for `validate`, `bpa run`, `test run`, `query`**: `{command, durationMs, summary{errors,warnings,info,total}, findings[]}` with per-finding `severity` (`error|warning|info`), `source`, `code`, `message`, `object`, `objectType`, `objectPath`, optional `expressionPosition`, `fixable`. The old `bpa run` keys are gone: `results` → `findings`, `ruleId` → `code`, `severityLabel` → `severity`, `canFix` → `fixable`. `violations` on `bpa run` is still the integer count; `jq '.findings[] | .code'` for the list. - **`te bpa run --fix --output-format json` is one document**. The fix outcome sits under a `fix` key (`fix.changes[]`, or `fix.error`); there is no second concatenated document, so plain `jq` works without `--slurp`. - **Mutation JSON is `changes[]`, not status lines**: each entry `{objectPath, objectType, changeKind, properties[]}` with `changeKind` in `created|deleted|modified|moved` (not `added`/`removed`, not `action`) and `properties[]` as `{property, before, after}` (PascalCase names). `te diff` emits the same shape. Text output is a before/after diff by default; `--stat` / `--name-only` shorten it. - **`mutationOutput none` hides the diff entirely**. Tell: a `te set`/`te add` prints only `Dry run - nothing saved. Add --save to persist.` with nothing above it. Fix: pass `--diff`, `--stat` or `--name-only` on the command (a flag beats the setting), or `--output-format json` (always complete). - **`autoFormat` rewrites DAX you did not touch on purpose**. With `autoFormat true`, every object a mutation changes has all its DAX properties reformatted with the built-in formatter, so `te set Sales/Revenue -p Description=x` also shows an `Expression` before/after. Tell: `Auto-format: N expression(s) formatted` on stderr. Fix: `te config set autoFormat false`, or accept it. Objects the mutation did not change are never reformatted. ### Behavior - **`te deploy` and `te refresh` do nothing without `--execute`, and both ask before acting**. Without `--execute` they connect read-only, print the TMSL they would run to stdout and exit 0. With `--execute` at a terminal they ask for confirmation (`n` is the default). Tell in CI: an error saying the run is unattended and needs `--force`. Fix: `--execute --force --non-interactive` on every unattended deploy **and refresh**. Capture the script with a redirect: `te deploy ... > deploy.tmsl`. - **`te deploy` can fail after writing the metadata**. Tell: exit non-zero, `"success": false` with the reason in `error`, and a headline saying the deploy landed with object errors. The server accepted the metadata but parked objects with errors, so nobody can query them; fix the model rather than retrying the deploy. Unprocessed objects are not a failure. - **`-s`/`-d` on `te deploy` are the SOURCE, not the target**. Tell: `-s/--server and -d/--database select the model source. To choose the deploy target, use --target-server and --target-database.` Fix: `te deploy --model ./model --target-server ws --target-database m --execute`. With a remote source the target flags are required (`No deploy target specified`); a local source falls back to the active `te connect` connection. - **`te script` exits non-zero when a script calls `Error(...)`**. Tell: `Completed with errors: 1 script(s) executed, 1 error(s) reported.`, exit 1, JSON `success: false`. Changes made before the error are still written under `--save`. `Warning`/`Info` do not fail the run. - **DAX-executing commands need a deployed model**. `te query`, `te vertipaq`, `te refresh`, `te test run`, and `te test snapshot` error with `No server specified. Use -s/-d or set an active connection with "te connect".` when given only a local `--model`. Metadata commands (`list`, `get`, `set`, `add`, `remove`, `move`, `validate`, `bpa run`, `script`, `save-as`) are fine on local models. Offline exception: `te vertipaq --import `. - **`te list` is filesystem-style, not workspace-style**. `te list Sales` lists Sales' children (columns + measures), not "find Sales". Use `te find` for full-text search, `te get --where Prop=Value` for property filters. - **`te find` is a literal substring; `te get --where` with no path only sees tables**. `te find "Gross*"` looks for a literal asterisk (add `--regex` for patterns); `te get --where Name=*Gross*` with no path filters the top-level tables, so a measure search is `te get Measures --where Name=*Gross*`. An empty result now says what was searched and how, and offers the widening command; JSON prints `[]`. - **`te get` with a wildcard lists; `-p`/`--deps`/`--properties` need one object**. `te get "Sa*"` lists every match without `--ls`; `te get "Sa*" -p Expression` is refused with a hint to drop the flag. Mutating commands (`set`, `add`, `remove`, `move`) and `te deps` refuse wildcards outright. - **Leaving `te interactive` with staged edits is guarded**. At a terminal `exit` asks to confirm (`n` default); when input is piped or `--non-interactive`, the session warns, saves nothing and exits non-zero. Fix: `save` before `exit`, or `exit --force` to discard deliberately. Ctrl+C at the prompt now discards the half-typed line for good. - **A TMDL folder without `database.tmdl` loads with a substituted compatibility level**. Tell: a warning naming the missing file, and `TE0014` from `te validate` (still exit 0). `te validate` also reports `TE0012` (duplicate column/measure name in a table) and `TE0013` (measure name repeated across tables) as errors, and `te save-as` refuses such a model unless `--force`/`--skip-validation`. - **Administrator policies can refuse a command on Windows**. Tell: an error naming `DisableCSharpScripts` (`te script`, `te bpa run --fix`), `DisableMacros` (`te macro`), or `DisableBpaDownload` (URL rule sources), or `BlockUnsafeScripts` (a script or macro that touches files, the network, processes or `#r`), exit non-zero. Fix: none from the CLI; the policy is the administrator's decision. See config-cicd-env.md. - **`--save` is opt-in for editing commands** (when `interactiveEditMode` is the default `stage`). Without it, `te set`, `te add`, `te remove`, `te move`, `te script`, `te macro run`, `te bpa run --fix` operate in memory only and print the diff followed by `Dry run - nothing saved.` See the Staging model section in SKILL.md for the `save` / `revert` alternatives inside `te interactive`. - **`te validate` does not exercise partition M**; it checks structural/DAX validity, not whether `Table.FromRows` literals parse or SQL endpoints respond. A model with broken partitions still passes `te validate` cleanly. Verify partitions explicitly after table creation. - **`te connect` is session-scoped (per shell PID)**. Each fresh shell (each Claude Code `Bash` tool call spawns one) starts a new session without the active connection. Either set `TE_SESSION=` to share state between shells, or pass `--model ` (and `-s`/`-d` where needed) explicitly to every command. - **BPA config keys are nested under `bpa.`**. `te config set bpaOnDeploy false` fails with "Unknown key"; the correct form is `te config set bpa.onDeploy false`. Same for `bpa.onSave`, `bpa.onMutation`, `bpa.rules`, `bpa.builtInRules`, `bpa.disabledBuiltInRuleIds`. - **`--output-format` (stdout) vs `--serialization` (on-disk)** are different flags. The first picks how stdout is rendered (text/json/csv/tmsl/tmdl); the second picks the model file format (tmdl/bim/database.json/pbip) on `te save-as` and the mutating commands. `--serialization tmsl` is an alias for `bim`. - **`te deploy --create-only` fails if the model exists**. Use without `--create-only` to overwrite (the default), or check with a probe call first. - **BPA gate on deploy/save can mask sloppy commits**. If bypassing with `--skip-bpa`, log it loudly. Prefer `--fix-bpa` or address violations. - **TE2 compat mode auto-detects** when args contain TE2-style flags but no `te` subcommand. Don't rely on this in scripts; be explicit with `TE_COMPAT=te2` so behavior is reproducible. - **Local Analysis Services instances are Windows-only**: `te connect --local` (Power BI Desktop, Visual Studio workspaces, standalone SSAS) and `te connect "localhost:PORT"` won't work on macOS/Linux even though the binary runs there. - **Preview builds stop running after 2026-12-31** (00:00 UTC on 1 January 2027); the preview notice and its remaining-days count reappear near the cutoff regardless of `hidePreviewNotice`. No license is required during the preview. Plan for the hard expiry. - **Secrets on the cmd line leak** into `ps`, shell history, CI logs. Use `--auth env` with env vars, stdin (`-`), or `--auth managed-identity`. Unknown `--auth` values (`auto`, `interactive`, `spn`, `env`, `managed-identity` are valid) error instead of falling back, as do unknown `--ci` values (`vsts`/`azdo`/`azure-devops`, `github`/`gh`, `none`). - **`--non-interactive` with nothing to sign in with fails immediately**. Tell: `no credentials are available` listing `te auth login`, a cached SPN (`te auth login -u -p -t`), `--auth env`, `--auth managed-identity`. No browser is opened and nothing waits; a cached service principal is still used silently.