askill
tabular-editor-cli

tabular-editor-cliSafety 98Repository

This skill should be used when the user asks to "run TabularEditor.exe", "deploy a model via CLI", "use Tabular Editor command line", "set up CI/CD for Power BI", "automate model deployment", "run BPA from command line", "save model as TMDL", "compare model schemas", or mentions TabularEditor.exe flags like -D, -S, -A, -B, -T, -O, -C. Provides CLI syntax reference for Tabular Editor 2/3 deployment, scripting, BPA analysis, and CI/CD integration. Distinct from c-sharp-scripting skill which covers writing script content rather than CLI execution.

6 stars
1.2k downloads
Updated 1/27/2026

Package Files

Loading files...
SKILL.md

Tabular Editor CLI

Command-line interface for Tabular Editor 2 (TE2) and Tabular Editor 3 (TE3).

Installation

Tabular Editor 2 (Free)

Tabular Editor 3 (Licensed)

Executables

VersionExecutableNotes
TE2TabularEditor.exe or start.cmdFree, Windows-only
TE3TabularEditor.exe (TE3 folder)Licensed, Windows/Mac/Linux

Connection Sources

Local Files

# model.bim (JSON format)
TabularEditor.exe Model.bim

# TMDL folder
TabularEditor.exe definition/

# PBIP project
TabularEditor.exe MyReport.pbip

Remote XMLA Endpoints

# Analysis Services
TabularEditor.exe "localhost\tabular" "AdventureWorks"

# Power BI Premium/Fabric
TabularEditor.exe "powerbi://api.powerbi.com/v1.0/myorg/WorkspaceName" "ModelName"

Power BI Desktop

# Auto-detect running instance
TabularEditor.exe localhost:PORT DatabaseName

Note: Find the port in PBIDesktop diagnostic files or use tools like DAX Studio.

Command-Line Reference

Basic Syntax

TabularEditor.exe <source> [options]

Script Execution

# Inline C# script
TabularEditor.exe Model.bim -S "Info(Model.Name);"

# Script file
TabularEditor.exe Model.bim -S script.csx

# Multiple scripts (executed in order)
TabularEditor.exe Model.bim -S script1.csx -S script2.csx

Deployment

# Deploy to XMLA endpoint
TabularEditor.exe Model.bim -D "server" "database"

# Deploy with options
TabularEditor.exe Model.bim -D "server" "database" -O -C -P -R -M -E -V -W

Deployment Options

FlagDescription
-OOverwrite existing database
-CCreate database if not exists
-PPartition/data sources only (no structure)
-RReplace roles only
-MReplace role members only
-EDeploy partitions using server names (incremental refresh)
-VVerbose mode
-WWarning mode (warnings as errors)

Save Output

# Save to model.bim
TabularEditor.exe Model.bim -S script.csx -B Output.bim

# Save to TMDL folder
TabularEditor.exe Model.bim -S script.csx -T output/

# Save to PBIP format (TE3 only)
TabularEditor.exe Model.bim -S script.csx -PBIP output.pbip

Best Practice Analyzer

# Run BPA rules
TabularEditor.exe Model.bim -A rules.json

# Run BPA with output file
TabularEditor.exe Model.bim -A rules.json -G results.sarif

# Fail on specific severity
TabularEditor.exe Model.bim -A rules.json -W  # Warnings as errors

Schema Comparison

# Compare source to target
TabularEditor.exe SourceModel.bim -DIFF "server" "database" -DIFFOUTPUT changes.json

Common Operations

1. Deploy Local Model to Service

TabularEditor.exe Model.bim ^
    -D "powerbi://api.powerbi.com/v1.0/myorg/Workspace" "SemanticModel" ^
    -O -C

2. Run Script and Save

TabularEditor.exe Model.bim -S format-dax.csx -B Model.bim

3. Run BPA Analysis

TabularEditor.exe Model.bim ^
    -A https://raw.githubusercontent.com/microsoft/Analysis-Services/master/BestPracticeRules/BPARules.json ^
    -G bpa-results.sarif

4. Refresh Model Data

TabularEditor.exe "server" "database" ^
    -S "Model.RequestRefresh(RefreshType.Full);" ^
    -D "server" "database"

5. Export Model from Service

TabularEditor.exe "powerbi://api.powerbi.com/v1.0/myorg/Workspace" "Model" ^
    -T output/definition

Authentication

Windows Authentication (Default)

Used automatically for on-premises SSAS.

Service Principal (Azure AD App)

Set environment variables:

set AZURE_CLIENT_ID=your-app-id
set AZURE_TENANT_ID=your-tenant-id
set AZURE_CLIENT_SECRET=your-secret

Connection string format:

Provider=MSOLAP;
Data Source=powerbi://api.powerbi.com/v1.0/myorg/Workspace;
User ID=app:CLIENT_ID@TENANT_ID;
Password=CLIENT_SECRET

Interactive (TE3 Only)

TabularEditor.exe "server" "database" --auth interactive

CI/CD Integration

Azure DevOps Pipeline

steps:
  - task: PowerShell@2
    displayName: 'Deploy Semantic Model'
    inputs:
      targetType: 'inline'
      script: |
        TabularEditor.exe "$(Build.SourcesDirectory)/Model.bim" `
          -D "$(XMLA_ENDPOINT)" "$(MODEL_NAME)" -O -C

GitHub Actions

jobs:
  deploy:
    runs-on: windows-latest
    steps:
      - name: Deploy Model
        run: |
          TabularEditor.exe Model.bim -D "${{ secrets.XMLA_ENDPOINT }}" "ModelName" -O -C

Exit Codes

CodeDescription
0Success
1Script error or deployment failure
2BPA rule violations (when -W used)

File Formats

Input Formats

  • model.bim - Tabular JSON (legacy)
  • definition/ - TMDL folder (modern)
  • *.pbip - Power BI Project (TE3)

Output Formats

FlagFormatDescription
-B.bimTabular JSON
-TfolderTMDL
-PBIP.pbipPower BI Project (TE3)

Troubleshooting

"Database not found"

  • Check server/workspace name is exact
  • Verify you have access to the workspace
  • Ensure XMLA endpoint is enabled

"Authentication failed"

  • Verify environment variables are set correctly
  • Check service principal has workspace access
  • Confirm API permissions are granted

"Script execution failed"

  • Check C# syntax is valid
  • Verify all referenced objects exist
  • Add Info() statements to debug

Quick Reference Card

+---------------------------------------------------------+
| TABULAR EDITOR CLI QUICK REFERENCE                      |
+---------------------------------------------------------+
| SOURCES                                                 |
|   Model.bim           Local JSON model                  |
|   definition/         TMDL folder                       |
|   "server" "db"       XMLA connection                   |
+---------------------------------------------------------+
| SCRIPTS                                                 |
|   -S "code"           Inline C# script                  |
|   -S file.csx         Script file                       |
+---------------------------------------------------------+
| DEPLOYMENT                                              |
|   -D "server" "db"    Deploy to target                  |
|   -O                  Overwrite existing                |
|   -C                  Create if not exists              |
+---------------------------------------------------------+
| OUTPUT                                                  |
|   -B output.bim       Save as JSON                      |
|   -T folder/          Save as TMDL                      |
+---------------------------------------------------------+
| BPA                                                     |
|   -A rules.json       Run BPA analysis                  |
|   -G results.sarif    Output BPA results                |
+---------------------------------------------------------+

References

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

98/100Analyzed 4 hours ago

Metadata

Licenseunknown
Version-
Updated1/27/2026
Publisherdata-goblin

Tags

apici-cddatabasegithubgithub-actionssecurity