Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/features/Command-line-Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ As of [version 2.8](https://github.com/TabularEditor/TabularEditor/releases/tag/

You can also annotate tables and columns if you want the schema check to treat them in a specific way. [More information here](xref:importing-tables-te2#ignoring-objects).

The Tabular Editor CLI runs the same check with [`te schemacheck`](xref:te-cli-commands#schemacheck), which also checks Power Query (M) and Direct Lake tables.

## Command Line output and Exit Codes
The command line provides various details, depending on the switches used and any events encountered during execution. Exit Codes were introduced in [version 2.7.4](https://github.com/TabularEditor/TabularEditor/releases/tag/2.7.4).

Expand Down
2 changes: 1 addition & 1 deletion content/features/te-cli/includes/te-cli-preview-notice.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
> [!IMPORTANT]
> The Tabular Editor CLI is in **Limited Public Preview**. It is offered for evaluation with a Tabular Editor account; no license is required during preview. Commands, flags, and outputs may change before general availability. **The preview build stops functioning after 2026-10-31.** We recommend against using the CLI in production CI/CD pipelines during preview.
> The Tabular Editor CLI is in **Limited Public Preview**. It is offered for evaluation with a Tabular Editor account; no license is required during preview. Commands, flags, and outputs may change before general availability. **The preview build stops functioning after 2026-12-31.** We recommend against using the CLI in production CI/CD pipelines during preview.
4 changes: 2 additions & 2 deletions content/features/te-cli/te-cli-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: te-cli-auth
title: Authentication and Connections
author: Peer Grønnerup
updated: 2026-09-11
updated: 2026-10-27
applies_to:
products:
- product: Tabular Editor 2
Expand Down Expand Up @@ -60,7 +60,7 @@ te auth login -u "$AZURE_CLIENT_ID" -t "$AZURE_TENANT_ID" --certificate ./sp.pfx
te auth login --identity # Alias: -I
```

After a successful service-principal login the CLI **caches the credentials** so every subsequent `te` command can acquire tokens silently - no need to re-pass `-u / -p / -t` or set the `AZURE_CLIENT_*` environment variables. Pass `--save=false` for a one-shot login that doesn't update the cache, or run `te auth logout` to clear it.
After a successful service-principal login the CLI **caches the credentials** so every subsequent `te` command can acquire tokens silently - no need to re-pass `-u / -p / -t` or set the `AZURE_CLIENT_*` environment variables. Run `te auth logout` to clear the cache. To use a service principal without storing its credentials on the machine, skip `te auth login`: set `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET` and `AZURE_TENANT_ID` and pass `--auth env` to each command.

> [!WARNING]
> Passing secrets directly on the command line exposes them to process listings and shell history. Prefer the `AZURE_CLIENT_SECRET` environment variable, or pipe the secret via stdin with `-p -`.
Expand Down
6 changes: 3 additions & 3 deletions content/features/te-cli/te-cli-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: te-cli-automation
title: Automation and Scripting
author: Peer Grønnerup
updated: 2026-09-11
updated: 2026-10-27
applies_to:
products:
- product: Tabular Editor 2
Expand Down Expand Up @@ -36,7 +36,7 @@ te query -q "EVALUATE VALUES('Date'[Year])" --output-format csv
te bpa run --output-format json
```

Under `--output-format json`, `te validate`, `te bpa run`, `te test run`, and `te query` share one JSON document shape with a `summary`, a flat `findings[]` array, and `durationMs` - see @te-cli-findings for the shape to parse.
Under `--output-format json`, `te validate`, `te bpa run`, `te schemacheck`, `te test run`, and `te query` share one JSON document shape with a `summary`, a flat `findings[]` array, and `durationMs` - see @te-cli-findings for the shape to parse.

> [!NOTE]
> `--output-format` and `--error-format` are independent. Setting `--output-format json` does *not* switch stderr to JSON; pass `--error-format json` for that. There is no automatic format switching when stdout is redirected - the default is always `text` unless you ask otherwise.
Expand All @@ -59,7 +59,7 @@ Every `te` command exits with a predictable status code so callers can branch on
| Exit | Meaning |
| -- | -- |
| `0` | Success. |
| `1` | Generic failure - invalid arguments, command failed, validation errors, auth failure, BPA gate failed at severity >= error, a `te script` run in which a script called `Error(...)`, a `te deploy` the server accepted with object errors. For `te diff`: differences found (like the `diff`/`cmp` convention). |
| `1` | Generic failure - invalid arguments, command failed, validation errors, auth failure, BPA gate failed at severity >= error, a `te schemacheck` run that found an error (or any drift with `--fail-on warning`), a `te script` run in which a script called `Error(...)`, a `te deploy` the server accepted with object errors. For `te diff`: differences found (like the `diff`/`cmp` convention). |
| `2` | `te diff` only: an error occurred while comparing, so the difference status is unknown. |

Combine exit codes with `--ci <vsts\|github>` annotations and `--trx <file>` to surface rich failure information in CI - see @te-cli-cicd.
Expand Down
22 changes: 18 additions & 4 deletions content/features/te-cli/te-cli-cicd.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
uid: te-cli-cicd
title: CI/CD Integration
author: Peer Grønnerup
updated: 2026-09-11
updated: 2026-10-27
applies_to:
products:
- product: Tabular Editor 2
Expand All @@ -21,7 +21,7 @@ The Tabular Editor CLI is designed for unattended execution in continuous integr
> [!WARNING]
> **Do not use the CLI in production pipelines during Limited Public Preview.** Two preview-specific risks apply to pipeline owners:
>
> - **Hard expiry.** The preview binary stops functioning on **2026-10-31** - any pipeline depending on it will fail on that date, regardless of your release calendar.
> - **Hard expiry.** The preview binary stops functioning on **2026-12-31** - any pipeline depending on it will fail on that date, regardless of your release calendar.
> - **No backwards-compatibility guarantee.** Commands, flags, output shapes, and exit codes may change between preview builds, so pipeline steps may need updating when you refresh the vendored binary.
>
> Build and evaluate in non-production pipelines, and share feedback in the public [TabularEditor/CLI](https://github.com/TabularEditor/CLI) repository so the GA version matches your needs.
Expand All @@ -35,7 +35,7 @@ The Tabular Editor CLI is designed for unattended execution in continuous integr
- **`--ci vsts` / `--ci github`.** Emit native pipeline annotations to stderr, carrying the finding's code (`code=` on Azure DevOps, `title=` on GitHub). `azdo` / `azure-devops` and `gh` are accepted aliases, `none` means no annotations, and a mistyped value is rejected before the command runs instead of silently emitting nothing.
- **`--trx <file>`.** Produce VSTEST results consumable by Azure DevOps test publishing.
- **Structured errors.** `--error-format json` emits `{"error": "...", "hint": "..."}` to stderr so pipeline steps can fail with a useful message.
- **One findings JSON.** `te validate`, `te bpa run`, `te test run`, and `te query` share a single machine-readable JSON document under `--output-format json` - a `summary`, a flat `findings[]` array with `severity`/`source`/`code`/`message`, and, where resolvable, an `objectPath` you can feed back to `te get`. See @te-cli-findings.
- **One findings JSON.** `te validate`, `te bpa run`, `te schemacheck`, `te test run`, and `te query` share a single machine-readable JSON document under `--output-format json` - a `summary`, a flat `findings[]` array with `severity`/`source`/`code`/`message`, and, where resolvable, an `objectPath` you can feed back to `te get`. See @te-cli-findings.

## Adding the CLI to your repo

Expand All @@ -54,7 +54,7 @@ your-repo/
Place the **extracted** binary - not the archive - so the pipeline can call it directly. Pick the build that matches your runner OS/arch; see @te-cli-install for the filename table. The self-contained binary is ~70 MB; consider Git LFS if your repo is sensitive to size.

> [!NOTE]
> Committing the binary also pins the CLI version to whatever you checked in, which is desirable for CI reproducibility. To upgrade, replace the binary in `tools/te/` and commit it - the commit message is your version log. Keep in mind that the preview binary still expires on **2026-10-31** regardless of when you committed it, so a vendored copy is not a permanent dependency - plan to refresh it (and re-validate your pipeline against the new API surface) on preview-build cadence.
> Committing the binary also pins the CLI version to whatever you checked in, which is desirable for CI reproducibility. To upgrade, replace the binary in `tools/te/` and commit it - the commit message is your version log. Keep in mind that the preview binary still expires on **2026-12-31** regardless of when you committed it, so a vendored copy is not a permanent dependency - plan to refresh it (and re-validate your pipeline against the new API surface) on preview-build cadence.

## GitHub Actions

Expand Down Expand Up @@ -186,6 +186,20 @@ te deploy --model ./model --target-server my-ws --target-database my-model --ski

See @te-cli-config for controlling the BPA gate globally via `bpa.onDeploy` / `bpa.onSave` config keys.

## Schema drift check

Run [`te schemacheck`](xref:te-cli-commands#schemacheck) before a deploy to catch source columns that were dropped or retyped since the model was last updated. The agent needs network access and credentials for the model's data sources.

```bash
# A missing source column fails the step; added or retyped columns are warnings
te schemacheck --model ./model --non-interactive --ci vsts --trx schema.trx

# Fail on any drift
te schemacheck --model ./model --non-interactive --fail-on warning --ci github
```

Tables the CLI can't check are listed with the reason and don't fail the step. To fail on them too, check `tablesSkipped` in the JSON output.

## Script validation

C# scripts can be compile-checked without loading any model - an offline lint step for PR validation:
Expand Down
Loading