From a3a97a334281ca149fd831aa1744c83060e90760 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:00 +0200 Subject: [PATCH 01/49] New translations table-groups.md (Spanish) [ci skip] --- localizedContent/es/content/features/table-groups.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/localizedContent/es/content/features/table-groups.md b/localizedContent/es/content/features/table-groups.md index 4ebda5070..19350208d 100644 --- a/localizedContent/es/content/features/table-groups.md +++ b/localizedContent/es/content/features/table-groups.md @@ -2,7 +2,7 @@ uid: table-groups title: Grupos de tablas author: Daniel Otykier -updated: 2023-03-08 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -25,6 +25,8 @@ Los grupos de tablas son una nueva funcionalidad disponible en Tabular Editor 3 Puedes configurar los grupos de tablas haciendo clic con el botón derecho en una tabla y eligiendo la opción de menú **Crear > Grupo de tablas**, o bien especificando un nombre para el grupo de tablas en la **vista de propiedades** mientras seleccionas una o varias tablas. +También puedes usar el submenú contextual **Mover al grupo** al hacer clic con el botón derecho en una o varias tablas seleccionadas. El submenú muestra los grupos de tablas existentes, una opción **(Nuevo...)** que crea un nuevo grupo a partir de las tablas seleccionadas y abre el editor para asignarle un nombre, y una opción **(Ninguno)** que elimina la asignación del grupo de tablas. + Las tablas se pueden mover entre grupos de tablas arrastrando y soltando en el Explorador TOM. Ten en cuenta que, a diferencia de las carpetas de visualización para medidas, columnas y jerarquías, los grupos de tablas no se pueden anidar. Al hacer clic con el botón derecho en un grupo de tablas en el Explorador TOM, obtienes las mismas opciones del menú contextual que si hubieras seleccionado la tabla o las tablas dentro de ese grupo de tablas. From 27c01c4bfeabce2f25e1e4c3ee338c91fac60316 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:03 +0200 Subject: [PATCH 02/49] New translations tom-explorer-view.md (Spanish) [ci skip] --- .../es/content/features/views/tom-explorer-view.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localizedContent/es/content/features/views/tom-explorer-view.md b/localizedContent/es/content/features/views/tom-explorer-view.md index cdbf86e9a..790b15e4b 100644 --- a/localizedContent/es/content/features/views/tom-explorer-view.md +++ b/localizedContent/es/content/features/views/tom-explorer-view.md @@ -2,7 +2,7 @@ uid: tom-explorer-view title: Vista del Explorador TOM author: Morten Lønskov -updated: 2026-03-19 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -52,7 +52,7 @@ El menú del botón derecho incluye los siguientes elementos, algunos de los cua Muestra un submenú que permite crear nuevas medidas, columnas, jerarquías, carpetas de visualización o elementos de cálculo bajo el objeto seleccionado. Las opciones disponibles dependen del tipo de objeto seleccionado. - **Mover a un grupo**: - Te permite organizar la tabla en un grupo de tablas dentro del Explorador TOM para navegar por el modelo con más facilidad. Esta opción solo está disponible para tablas. + Abre un submenú para organizar las tablas seleccionadas en un grupo de tablas y facilitar la navegación por el modelo. El submenú muestra los grupos de tablas existentes, una entrada **(Nuevo...)** que crea un grupo a partir de las tablas seleccionadas y abre el editor para nombrarlo, y una entrada **(Ninguno)** que elimina la asignación al grupo de tablas. Esta opción solo está disponible para tablas. - **Hacer invisible**: Marca el objeto como no visible en las herramientas cliente. La tabla sigue formando parte del modelo, pero está oculta para los autores de informes. Como alternativa, puedes usar el atajo **Ctrl+I** para ocultar el objeto. From 5e22f7c665e843a58eb524b9d494c212d61c5638 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:06 +0200 Subject: [PATCH 03/49] New translations downloads.md (Spanish) [ci skip] --- .../es/content/references/downloads.md | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/localizedContent/es/content/references/downloads.md b/localizedContent/es/content/references/downloads.md index 75a840d20..4e3fc4f0d 100644 --- a/localizedContent/es/content/references/downloads.md +++ b/localizedContent/es/content/references/downloads.md @@ -2,7 +2,7 @@ uid: downloads title: Todas las descargas author: Daniel Otykier -updated: 2026-04-17 +updated: 2026-06-25 --- # Descargas de Tabular Editor 3 @@ -11,14 +11,14 @@ Esta página ofrece instrucciones de descarga e instalación para Tabular Editor ## Última versión -Descargas de Tabular Editor 3.26.1 para **.NET 8**: +Descargas de Tabular Editor 3.26.2 para **.NET 8**: -- Descargar [Tabular Editor 3.26.1 (64 bits)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.x64.Net8.exe) _(recomendado)_ -- Descargar [Tabular Editor 3.26.1 (ARM64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.ARM64.Net8.exe) -- Versiones portátiles: [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.zip) -- Versión MSI: [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.msi), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.msi) +- Descargar [Tabular Editor 3.26.2 (64 bits)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe) _(recomendado)_ +- Descargar [Tabular Editor 3.26.2 (ARM64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) +- Versiones portátiles: [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) +- Versión MSI: [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) -Lee las [últimas notas de la versión](release-notes/3_26_1.md). +Lee las [notas de la versión más reciente](release-notes/3_26_2.md). ## Instrucciones de instalación @@ -30,6 +30,10 @@ No es necesario desinstalar versiones anteriores al actualizar a una versión m ## Historial +- 2026-06-25 **Tabular Editor 3.26.2** (_[Notas de la versión](release-notes/3_26_2.md)_) + - .NET 8 instalador (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) + - .NET 8 portátil (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) + - .NET 8 instalador (.msi): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) - 2026-04-17 **Tabular Editor 3.26.1** (_[Notas de la versión](release-notes/3_26_1.md)_) - Instalador de .NET 8 (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.x64.Net8.exe), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.ARM64.Net8.exe) - Versión portátil de .NET 8 (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.zip) @@ -62,16 +66,5 @@ No es necesario desinstalar versiones anteriores al actualizar a una versión m - .NET 8 instalador (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.Installer.x64.Net8.exe), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.Installer.x86.Net8.exe) - .NET 8 portátil (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x64.Net8.zip), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x86.Net8.zip) - .NET 8 instalador (.msi): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x64.Net8.msi), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x86.Net8.msi) -- 2025-04-25 **Tabular Editor 3.21.0** (_[Notas de la versión](release-notes/3_21_0.md)_) - - .NET 8 instalador (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.Installer.x64.Net8.exe), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.Installer.x86.Net8.exe) - - .NET 8 portátil (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x64.Net8.zip), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x86.Net8.zip) - - .NET 8 instalador (.msi): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x64.Net8.msi), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x86.Net8.msi) -- 2025-04-11 **Tabular Editor 3.20.1** (_[Notas de la versión](release-notes/3_20_1.md)_) - - .NET 8 instalador (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x64.Net8.exe), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x86.Net8.exe) - - .NET 8 portátil (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.Net8.zip), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.Net8.zip) - - .NET 8 instalador (.msi): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.Net8.msi), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.Net8.msi) - - .NET 6 instalador (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x64.exe), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x86.exe) - - .NET 6 portátil (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.zip), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.zip) - - .NET 6 instalador (.msi): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.msi), [x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.msi) Para versiones anteriores, consulta el [historial completo de versiones](release-history.md). \ No newline at end of file From 3d8c627f7fca3a92f32bc443f28b59ce1bb71563 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:11 +0200 Subject: [PATCH 04/49] New translations release-history.md (Spanish) [ci skip] --- localizedContent/es/content/references/release-history.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/localizedContent/es/content/references/release-history.md b/localizedContent/es/content/references/release-history.md index b994408c1..23f6cdac9 100644 --- a/localizedContent/es/content/references/release-history.md +++ b/localizedContent/es/content/references/release-history.md @@ -5,6 +5,10 @@ title: Historial completo de versiones # Historial completo de versiones +- 2026-06-25 **Tabular Editor 3.26.2** (_[Notas de la versión](release-notes/3_26_2.md)_) + - .NET 8 instalador (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) + - .NET 8 portátil (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) + - .NET 8 instalador (.msi): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) - 2026-04-17 **Tabular Editor 3.26.1** (_[Notas de la versión](release-notes/3_26_1.md)_) - Instalador de .NET 8 (.exe): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.x64.Net8.exe), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.ARM64.Net8.exe) - Versión portátil de .NET 8 (.zip): [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.zip) From 4917978cce3f1ac5c4ea25d84379005a12f52994 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:14 +0200 Subject: [PATCH 05/49] New translations whats-new.md (Spanish) [ci skip] --- localizedContent/es/content/references/whats-new.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localizedContent/es/content/references/whats-new.md b/localizedContent/es/content/references/whats-new.md index 446ae73af..bb21d3ba3 100644 --- a/localizedContent/es/content/references/whats-new.md +++ b/localizedContent/es/content/references/whats-new.md @@ -2,7 +2,7 @@ uid: whats-new title: Novedades author: Morten Lønskov -updated: 2026-03-19 +updated: 2026-06-24 --- - + From 168d6c7442fc2cc8401cd1d25ba6d2963e737e14 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:17 +0200 Subject: [PATCH 06/49] New translations udfs.md (Spanish) [ci skip] --- localizedContent/es/content/tutorials/udfs.md | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/localizedContent/es/content/tutorials/udfs.md b/localizedContent/es/content/tutorials/udfs.md index 2c5d6d9b5..f65e47e02 100644 --- a/localizedContent/es/content/tutorials/udfs.md +++ b/localizedContent/es/content/tutorials/udfs.md @@ -2,7 +2,7 @@ uid: udfs title: Funciones DAX definidas por el usuario author: Daniel Otykier -updated: 2026-03-19 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -20,7 +20,7 @@ applies_to: # Funciones DAX definidas por el usuario -Las funciones DAX definidas por el usuario (UDFs) constituyen una nueva capacidad de los modelos semánticos, introducida en Power BI Desktop con la actualización de septiembre de 2025. +Las UDF de DAX (funciones DAX definidas por el usuario) son una característica de los modelos semánticos. La característica pasó a versión preliminar con la actualización de septiembre de 2025 de Power BI Desktop y está [disponible de forma general](https://community.fabric.microsoft.com/t5/Power-BI-Updates-Blog/DAX-User-Defined-Functions-Generally-Available/ba-p/5185738) desde la versión de junio de 2026 de Power BI. La característica te permite crear funciones DAX reutilizables que puedes invocar desde cualquier expresión DAX de tu modelo, incluso desde otras funciones. Esta potente característica te ayuda a mantener la coherencia, reducir la duplicación de código y crear expresiones DAX más fáciles de mantener. @@ -133,8 +133,31 @@ Además de especificar el modo de evaluación, también puedes restringir el tip Estas especificaciones de tipo son opcionales, pero si se indican, realizarán una conversión de tipo implícita en los argumentos que se pasen a la función y también afectarán a las sugerencias de autocompletado en Tabular Editor 3 al escribir código DAX que llame a la función. +Tabular Editor 3 valida los argumentos según los tipos de parámetro declarados. Si llama a una UDF con un argumento que no coincide con el tipo de su parámetro —por ejemplo, si pasa un valor escalar cuando se espera un parámetro `TABLEREF`—, el Analizador semántico genera un Report de advertencia o un error. + Consulta la [especificación de Microsoft para las UDF](https://learn.microsoft.com/en-us/dax/best-practices/dax-user-defined-functions) para ver la lista completa de restricciones disponibles. +### Parámetros opcionales con expresiones predeterminadas + +A partir de la versión 3.26.2, Tabular Editor 3 admite parámetros opcionales con expresiones predeterminadas. Añade `= expression` después del nombre del parámetro (y después de cualquier indicación de tipo o modo de evaluación) para que el parámetro sea opcional. Cuando quien llama omite el argumento, la expresión predeterminada proporciona el valor. + +```dax +FUNCTION AddTax = + ( + amount: NUMERIC, // Parámetro obligatorio + taxRate: NUMERIC = 0.1 // Parámetro opcional; el valor predeterminado es 10 % + ) + => amount * (1 + taxRate) +``` + +Si llamas a `AddTax(10)`, obtienes `11`, mientras que si llamas a `AddTax(10, 0.25)`, obtienes `12.5`. + +Los parámetros opcionales se rigen por algunas reglas: + +- Puedes dejar vacío un argumento para usar su valor predeterminado; por ejemplo, `MyFunc(1,,3)` omite el segundo argumento. El número mínimo de argumentos lo determina la posición del parámetro obligatorio situado más a la derecha. +- Una expresión predeterminada solo puede hacer referencia a nombres (columnas, tablas, medidas, funciones) visibles donde se define la función, y no puede hacer referencia a otro parámetro de la misma función. +- La comprobación de tipos con respecto a la indicación de tipo de un parámetro solo se aplica cuando se usa la expresión predeterminada; en cambio, un argumento pasado explícitamente se comprueba con respecto a esa indicación. + ## Uso de las UDF en tu modelo ### En expresiones de objetos @@ -311,15 +334,15 @@ Tabular Editor 3 detecta automáticamente cualquier comentario y lo muestra corr **La función no funciona tras el despliegue** -- Comprueba que tu entorno de destino admite UDFs (nivel de compatibilidad 1702 o superior). A fecha del dieciséis de septiembre de 2025, Power BI Service todavía no admite UDFs, ni tampoco Azure Analysis Services ni SQL Server Analysis Services. +- Comprueba que tu entorno de destino admite UDFs (nivel de compatibilidad 1702 o superior). El servicio Power BI admite las UDF a partir de la versión de junio de 2026. Azure Analysis Services y SQL Server Analysis Services no admiten las UDF. ## Limitaciones -- No todos los entornos de Power BI admiten UDFs (requiere compilaciones específicas) +- Las UDF requieren un nivel de compatibilidad 1702 o superior; Azure Analysis Services y SQL Server Analysis Services no las admiten - Las UDFs no pueden ser recursivas (llamarse a sí mismas) > [!NOTE] -> A partir de junio de 2026, las UDF están [disponibles de forma general](https://community.fabric.microsoft.com/t5/Power-BI-Updates-Blog/DAX-User-Defined-Functions-Generally-Available/ba-p/5185738). Como parte de esto, las UDF ahora admiten expresiones predeterminadas y parámetros opcionales. Sin embargo, Tabular Editor 3 muestra actualmente un mensaje de error incorrecto cuando se usa la sintaxis de la expresión predeterminada. Este problema se corregirá en nuestra próxima actualización de Tabular Editor 3. +> Con la [disponibilidad general](https://community.fabric.microsoft.com/t5/Power-BI-Updates-Blog/DAX-User-Defined-Functions-Generally-Available/ba-p/5185738) de las UDF en junio de 2026, las UDF admiten parámetros opcionales con expresiones predeterminadas. Tabular Editor 3 admite esta sintaxis desde la versión 3.26.2. Las versiones anteriores muestran un mensaje de error incorrecto cuando usas la sintaxis de expresión predeterminada. --- From c61f9759d3a100d1133f42d89f584a03d5c5af80 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:21 +0200 Subject: [PATCH 07/49] New translations ai-assistant.md (Spanish) [ci skip] --- localizedContent/es/content/features/ai-assistant.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/localizedContent/es/content/features/ai-assistant.md b/localizedContent/es/content/features/ai-assistant.md index 30f01f3ff..61b6b309e 100644 --- a/localizedContent/es/content/features/ai-assistant.md +++ b/localizedContent/es/content/features/ai-assistant.md @@ -2,7 +2,7 @@ uid: ai-assistant title: Asistente de IA author: Morten Lønskov -updated: 2026-04-17 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -44,11 +44,11 @@ El Asistente de IA utiliza un modelo BYOK de clave aportada por el usuario. Tú ## Proveedores compatibles -Configura tu proveedor de IA en **Herramientas > Preferencias > Asistente de IA > Proveedor de IA**. Selecciona un proveedor en la lista desplegable — el valor predeterminado es **Ninguno (IA deshabilitada)** hasta que configures uno — introduce tu clave de API y, si lo deseas, reemplaza el modelo predeterminado. Para OpenAI y Anthropic, el campo **Nombre del modelo** es un cuadro combinado rellenado previamente con modelos conocidos; también puedes escribir un nombre de modelo personalizado. +Configura tu proveedor de IA en **Herramientas > Preferencias > Asistente de IA > Proveedor de IA**. Selecciona un proveedor en la lista desplegable — el valor predeterminado es **Ninguno (IA deshabilitada)** hasta que configures uno — introduce tu clave de API y, si lo deseas, reemplaza el modelo predeterminado. Para OpenAI y Anthropic, el campo **Nombre del modelo** es un cuadro combinado que viene relleno con los modelos actuales —incluidos `claude-fable-5` y `claude-opus-4-8` de Anthropic, y `gpt-5.5` y `gpt-5.5-pro` de OpenAI—, de modo que puedes elegir un modelo reciente sin tener que escribir un ID personalizado. También puedes escribir un nombre de modelo personalizado. | Proveedor | Modelo predeterminado | Configuración necesaria | | -------------------------------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------- | -| OpenAI | gpt-4o | Clave de API. URL base, ID de organización e ID de proyecto opcionales | +| OpenAI | gpt-5.5 | Clave de API. URL base, ID de organización e ID de proyecto opcionales | | Anthropic | claude-sonnet-4-6 | Clave de API. URL base opcional | | Azure OpenAI | Dependiente de la implementación | Clave de API, URL del punto de conexión y nombre de la implementación | | Personalizado (compatible con OpenAI) | Especificado por el usuario | Clave de API y URL personalizada del punto de conexión | @@ -57,7 +57,7 @@ Configura tu proveedor de IA en **Herramientas > Preferencias > Asistente de IA ### OpenAI -Selecciona **OpenAI** como proveedor e introduce tu clave de API. Opcionalmente, puedes especificar un ID de organización y un ID de proyecto si tu cuenta de OpenAI los usa. El modelo predeterminado es **gpt-4o**, pero puedes cambiarlo por cualquier modelo disponible en tu cuenta. +Selecciona **OpenAI** como proveedor e introduce tu clave de API. Opcionalmente, puedes especificar un ID de organización y un ID de proyecto si tu cuenta de OpenAI los usa. El modelo predeterminado es **gpt-5.5**, pero puedes cambiarlo por cualquier modelo disponible en tu cuenta. ![Configuración de OpenAI en el Asistente de IA](~/content/assets/images/ai-assistant/ai-assistant-openai-config.png) From 5fa5b4bb4260541f963068d367e3e4fd1b7390e8 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:24 +0200 Subject: [PATCH 08/49] New translations 3_26_2.md (Spanish) [ci skip] --- .../references/release-notes/3_26_2.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 localizedContent/es/content/references/release-notes/3_26_2.md diff --git a/localizedContent/es/content/references/release-notes/3_26_2.md b/localizedContent/es/content/references/release-notes/3_26_2.md new file mode 100644 index 000000000..d7750b7bc --- /dev/null +++ b/localizedContent/es/content/references/release-notes/3_26_2.md @@ -0,0 +1,120 @@ +--- +uid: release-3-26-2 +--- + +# Tabular Editor 3.26.2 + +# [**Descargas**](#tab/downloads) + +Descargas de Tabular Editor 3.26.2: + +- Descargar [Tabular Editor 3.26.2 (x64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe) _(recomendado)_ +- Descargar [Tabular Editor 3.26.2 (ARM64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) +- Versiones portátiles: [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) +- Versión MSI: [x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) + +_Si aún no has usado Tabular Editor 3, tienes derecho a una prueba de 30 días, que puedes activar después de la instalación. También puedes [comprar una licencia](https://tabulareditor.com/licensing)._ + +# [**Sumas de comprobación SHA-256**](#tab/checksums) + +| Archivo | Entorno de ejecución para «.NET» | Plataforma | SHA-256 | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ---------- | ------------------------------------------------------------------ | +| [TabularEditor.3.26.2.Installer.x64.Net8.exe](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe) | .NET 8 | x64 | `CDCEEF571902E58E3368F5A60BBF6926C310B34B2CC4ABA2F3D28B9A5C1C98AC` | +| [TabularEditor.3.26.2.x64.Net8.msi](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi) | .NET 8 | x64 | `D3C0FA8184855C57D16D78CD9D2A44A7622E3C67CD07CFDC7B6D0EA59FB30E09` | +| [TabularEditor.3.26.2.x64.Net8.zip](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip) | .NET 8 | x64 | `B4A2B836E6DA359E798D7546934F1A477C2F4C74D653995D77D2F182A57A8725` | +| [TabularEditor.3.26.2.Installer.ARM64.Net8.exe](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) | .NET 8 | ARM64 | `7CC1E25D51EA665787500DC460BB533F457E26FF7AE5A4B9F44480F980F1998F` | +| [TabularEditor.3.26.2.ARM64.Net8.msi](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) | .NET 8 | ARM64 | `A8A6E324D38E80140B171B5D7F84C5EBADD6AFE2810529504F332091ECF7E682` | +| [TabularEditor.3.26.2.ARM64.Net8.zip](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) | .NET 8 | ARM64 | `B265579D384A6586B7599CBC0A54032C5F477D3A485FC1F773F79D4B31D128C6` | + +*** + +Echa un vistazo a nuestro [blog de lanzamientos](https://blog.tabulareditor.com/) para ver un breve resumen de las actualizaciones más importantes de esta versión. + +## Mejoras en la versión 3.26.2 + +- Se añadió el submenú contextual de clic derecho **Mover a grupo** para las tablas del Explorador TOM. El submenú muestra los grupos de tablas existentes, una opción **(Nuevo...)** que crea un grupo nuevo con las tablas seleccionadas y abre el editor de nombres, y una opción **(Ninguno)** que quita la asignación del grupo de tablas. + +- Se actualizaron los preajustes de modelos en las preferencias del Asistente de IA con las últimas versiones, para que los usuarios puedan elegir modelos actuales sin escribir un ID de modelo personalizado. Se agregaron `claude-fable-5` y `claude-opus-4-8` de Anthropic, y `gpt-5.5`/`gpt-5.5-pro` de OpenAI, junto con otras variantes actuales de GPT-5. Se eliminaron las entradas obsoletas (como las variantes antiguas de Codex) y el modelo predeterminado de OpenAI ahora es `gpt-5.5`. + +- **Mejoras del analizador semántico** + - Se agregó compatibilidad con parámetros opcionales con expresiones predeterminadas en las UDF de DAX. + - El analizador semántico ahora emite mensajes de advertencia o error adecuados cuando se llama a una UDF con un parámetro que no coincide con su tipo declarado (por ejemplo, al pasar un valor escalar a un parámetro `TABLEREF`, etc.) + - El analizador semántico ahora informa de un error cuando `IGNORE` se usa en cualquier lugar que no sea directamente como argumento de expresión de `SUMMARIZECOLUMNS`, en consonancia con el comportamiento del motor. + - El analizador semántico ahora admite el nuevo componente opcional y los parámetros de escape introducidos para la función `NAMEOF` en Power BI Desktop de abril de 2026. Las palabras clave de componente válidas son `TABLE`, `COLUMN`, `MEASURE`, `CALENDAR`, `FULL`, `SELF`, `PARENT`; las palabras clave de escape válidas son `ESCAPED`, `UNESCAPED`, `MINIMALLYESCAPED`. El tipo de valor devuelto no cambia (cadena escalar). Por ejemplo, `EVALUATE { NAMEOF([MyMeasure], TABLE, MINIMALLYESCAPED) }` devuelve el componente del nombre de la tabla de una referencia de medida totalmente calificada. + +- **Mejoras de Semantic Bridge** + - Al importar una Databricks Metric View, ahora se incorporan los metadatos de la vista al modelo semántico. + - `comment` pasa a ser la descripción del modelo, las dimensiones y las medidas. + - `display_name` pasa a ser el nombre visible para el usuario en el modelo TOM, con `name` como alternativa si no se ha definido ningún `display_name`. + - El `format` de medidas y dimensiones se traduce a FormatString de TOM, y el DataType de la columna o medida resultante se infiere a partir del formato (moneda, porcentaje, fecha, etc.). + Las especificaciones de formato sin un equivalente claro en TOM recurren a un valor predeterminado razonable y generan una advertencia. + - Se ha mejorado la traducción de SQL a DAX: los recuentos de filas (`COUNT(*)`), las referencias `MEASURE(name)`, las operaciones binarias, los literales (incluido `NULL` -> `BLANK()`), la asignación de `/` al `DIVIDE` seguro frente a valores en blanco y la precedencia de los paréntesis ahora se traducen correctamente. + - Las expresiones fuera del conjunto reconocido siguen recurriendo al SQL literal, con una advertencia. + - La traducción a DAX se hace con el mejor esfuerzo posible; revísala y valídala antes de implementarla. + - Se agregó soporte para esquemas en copo de nieve con uniones anidadas. + - La deserialización de YAML acepta tanto `fields:` como `dimensions:` en el nivel superior: la especificación Databricks v1.1 los trata como alias. + El recorrido de ida y vuelta conserva la palabra clave que haya usado el YAML de origen. Las vistas creadas en TE3 (sin YAML de origen) usan `dimensions:` de forma predeterminada para v1.1 y anteriores: el alias `fields:` se introdujo después de que se publicara la especificación v1.1, así que mantenemos la compatibilidad con las herramientas que usan la especificación 1.1 original. + Aparece una advertencia de deserialización cuando una vista v1.1+ usa `dimensions:` (la especificación marca `fields:` como opción preferida a partir de v1.1), y aparece una advertencia equivalente cuando una vista anterior a v1.1 usa `fields:`. + - En la superficie de scripting de C# Script, `Dimension` pasa a llamarse `Field` (`view.Fields`, `view.AddField`, `Dimension` -> `Field`, `MakeValidationRuleForDimension` -> `MakeValidationRuleForField`, `ctx.DimensionNames` -> `ctx.FieldNames`). + - Los nombres heredados se mantienen como alias obsoletos que siguen compilando y ejecutándose con advertencias de desuso, por lo que los scripts existentes y las rutas almacenadas como `Model.Dimensions["x"]` siguen funcionando. + - Las medidas de ventana (incluido el campo `offset:` de v1.1) se conservan en la deserialización y serialización de YAML. Aún no traducimos las características que la especificación marca como experimentales; el round-trip de YAML las conserva para que no se pierdan. + - Las uniones ahora admiten dos propiedades nuevas en la especificación v1.1 actualizada: + - Se admite el mapa `rely:` + - El campo `cardinality:` se conserva en la ida y vuelta tanto para los dos valores de la especificación (`many_to_one`, `one_to_many`) como cuando se omite. + Un valor desconocido usa `many_to_one` como valor predeterminado, con una advertencia. + - Las uniones declaradas con `cardinality: one_to_many` se siguen importando, pero la relación con el origen se omite intencionadamente: la especificación v1.1 trata estas uniones como orígenes de hechos independientes, agregados por separado a la granularidad del origen. + La tabla combinada se sigue creando para que aparezca en el modelo TOM resultante, pero sin las relaciones definidas. + Se muestra una advertencia que señala esta diferencia en cada unión afectada. + +## Correcciones de errores en 3.26.2 + +- Se corrigió un error por el que el chat de IA fallaba con un error `BadRequest` ("temperature is deprecated for this model") en Anthropic Claude Opus 4.7+ y Fable 5, que dejaron de admitir el parámetro de muestreo `temperature`. La lógica de reintento que reenvía la solicitud de forma transparente sin indicar explícitamente `temperature` ahora también reconoce la redacción de este proveedor, además de los casos que ya se contemplaban. + +- Ahora se sugieren calendarios en el autocompletado para las funciones `NAMEOF` y `TABLEOF`, junto con tablas, columnas y medidas. Esto incluye calendarios que no tienen configuradas columnas de unidad de tiempo (como un calendario recién agregado y aún sin configurar), que antes se omitían. Al escribir un prefijo entre comillas simples (por ejemplo, `'My Cal`), ahora se limitan las sugerencias a los calendarios coincidentes, igual que ocurre con las tablas. + +- La ordenación y la paginación en la **Vista previa de datos** de la tabla ahora son más fiables en todos los modos de almacenamiento: + +- La ordenación por una columna que no tiene jerarquía de atributos ya no devuelve las filas en un orden incorrecto. Cuando es posible, la paginación ahora usa la función `WINDOW` (en motores que la admiten, para tablas con clave primaria); de lo contrario, la vista previa muestra las primeras filas e indica que el desplazamiento está desactivado. + +- La disponibilidad de la jerarquía de atributos ahora se lee directamente del servidor, por lo que sigue siendo correcta incluso después de que el modelo se procese fuera de Tabular Editor. + +- Las tablas DirectQuery ahora muestran correctamente las primeras filas (la paginación no es posible con DirectQuery), junto con un mensaje informativo. + +- Los metadatos de la vista previa se almacenan en caché durante la sesión y solo se actualizan cuando haces clic en **Actualizar**, lo que evita viajes de ida y vuelta innecesarios al servidor (incluidas las consultas repetidas de recuento de filas). + +- El formateador de DAX ya no elimina el calificador de tabla de los bloques `DEFINE MEASURE` cuando la tabla principal no se puede resolver en el modelo. Antes, esto podía convertir un `MEASURE 'Sales'[Amount] = ...` válido en el inválido `MEASURE [Amount] = ...`, lo que invalidaba la instrucción. + +- El analizador semántico ya no informa de un error espurio cuando se usa una función de eliminación de filtros (`ALL`, `ALLSELECTED`, `REMOVEFILTERS` o `ALLCROSSFILTERED`) como expresión principal del cuerpo de una función DAX definida por el usuario; por ejemplo: `FUNCTION F = () => REMOVEFILTERS('Sales')`. Estas UDF son válidas cuando se invocan como argumento de filtro de `CALCULATE`. El uso incorrecto se sigue notificando en los puntos de invocación, y los modificadores de relación (`CROSSFILTER` / `USERELATIONSHIP`) y `KEEPFILTERS` siguen siendo inválidos como cuerpos de UDF, en consonancia con el comportamiento del motor. + +- Al cambiar el nombre de una tabla a la que se hace referencia dentro de una llamada a la función NAMEOF, la corrección de fórmulas ahora actualiza correctamente la referencia a esa tabla. + +- El analizador semántico ya no informa de un error espurio cuando `TABLEOF(...)` se pasa como argumento de referencia de tabla a `ALL`, `ALLEXCEPT`, `ALLSELECTED`, `ALLNOBLANKROW`, `ALLCROSSFILTERED` o `REMOVEFILTERS`. + +- La acción **Actualizar esquema de tabla** ahora se comporta correctamente cuando se invoca en una combinación de tipos de objetos o cuando se invoca en un Grupo de tablas. + +--- + +## ¿Vienes de Tabular Editor 2.x? + +Mira [este vídeo](https://youtu.be/O4ATwdzCvWc) para hacer un recorrido rápido por las principales funcionalidades de Tabular Editor 3. Además, asegúrate de consultar nuestra [guía de inicio](https://docs.tabulareditor.com/onboarding/index.html). + +**Descripción general de las principales características de Tabular Editor 3:** + +- IDE totalmente personalizable, con compatibilidad con múltiples monitores, soporte HiDPI y temas +- Nuevo y potente editor de código DAX con autocompletado, comprobación de sintaxis, plegado de código y mucho, mucho más +- \*Modo del área de trabajo, que permite guardar los cambios en disco y sincronizar simultáneamente los metadatos del modelo con Analysis Services +- \*Previsualizar datos de tablas con desplazamiento infinito, crear PivotGrids o escribir consultas DAX para explorar el modelo o probar la lógica de cálculo +- \*Programar actualizaciones de datos +- Actualizar los esquemas de las tablas tanto en Data sources de proveedor como en orígenes de datos estructurados (sí, ¡incluso para consultas M!) +- Crear diagramas del Data model +- Crear scripts DAX que permiten editar varias medidas u otros objetos calculados en un solo documento +- Grabar C# Scripts y guardarlos como macros (antes conocidas como "Custom Actions") +- Integración con el Analizador VertiPaq +- Depurador de DAX +- Integración del Optimizador de DAX +- Acciones de código para refactorizar fácilmente tus expresiones DAX. + +\*=Solo disponible cuando se está conectado a una instancia de Analysis Services o Power BI + +--- + From bc395a7553bb48acbbbbf70a9b218e1d408dd7b2 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:27 +0200 Subject: [PATCH 09/49] New translations table-groups.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/features/table-groups.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/localizedContent/zh/content/features/table-groups.md b/localizedContent/zh/content/features/table-groups.md index 961a53ccf..47f3ca181 100644 --- a/localizedContent/zh/content/features/table-groups.md +++ b/localizedContent/zh/content/features/table-groups.md @@ -2,7 +2,7 @@ uid: table-groups title: 表格组 author: Daniel Otykier -updated: 2023-03-08 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -25,6 +25,8 @@ applies_to: 你可以通过两种方式创建表格组:在表格上右键并选择 **创建 > 表格组** 菜单选项;或者在选中一个或多个表格时,在 **属性视图** 中为表格组指定名称。 +你也可以在选中一个或多个表后,通过右键菜单中的 **移至组** 子菜单进行操作。 该子菜单会列出现有的表格组、用于根据所选表创建新组并打开组名编辑器的 **(新建...)** 项,以及用于取消表格组归属的 **(无)** 项。 + 你可以在 TOM Explorer 中通过拖放,将表格在不同表格组之间移动。 注意:与度量值、列和层次结构的显示文件夹不同,表格组不能嵌套。 在 TOM Explorer 中右键点击某个表格组,会显示与你选中该表格组内表格(s)时相同的上下文菜单选项。 From 93fd981f063ab61e9d96c554887a971328ec73d8 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:30 +0200 Subject: [PATCH 10/49] New translations tom-explorer-view.md (Chinese Simplified) [ci skip] --- .../zh/content/features/views/tom-explorer-view.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/localizedContent/zh/content/features/views/tom-explorer-view.md b/localizedContent/zh/content/features/views/tom-explorer-view.md index b3133e8bd..bd77b6a4a 100644 --- a/localizedContent/zh/content/features/views/tom-explorer-view.md +++ b/localizedContent/zh/content/features/views/tom-explorer-view.md @@ -2,7 +2,7 @@ uid: tom-explorer-view title: TOM Explorer 视图 author: Morten Lønskov -updated: 2026-03-19 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -51,8 +51,8 @@ TOM Explorer 由两个主要区域组成:第一部分是 Data model 对象, - **创建**: 展开为子菜单,可在所选对象下创建新的度量值、列、层次结构、显示文件夹或计算项。 可用选项取决于所选的对象类型。 -- **移至组**: - 可将该表归入 TOM Explorer 中的表格组,便于浏览模型。 此选项仅适用于表。 +- **移至组**: + 展开为子菜单,用于将所选表整理到表格组中,方便在模型中导航。 该子菜单会列出现有的表格组、用于根据所选表创建新组并打开其名称编辑器的 **(New...)** 条目,以及用于移除表格组分配的 **(None)** 条目。 此选项仅适用于表。 - **设为不可见**: 将对象标记为在客户端工具中不可见。 该表仍是模型的一部分,但会对 Report 作者隐藏。 也可以使用快捷键 **Ctrl+I** 隐藏该对象。 From e2c8ccae0f5fc82d9a44a8dc89f0a977013fd93d Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:33 +0200 Subject: [PATCH 11/49] New translations refresh-preview-query.md (Chinese Simplified) [ci skip] --- .../content/getting-started/refresh-preview-query.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/localizedContent/zh/content/getting-started/refresh-preview-query.md b/localizedContent/zh/content/getting-started/refresh-preview-query.md index 7d02befd1..e73e4383d 100644 --- a/localizedContent/zh/content/getting-started/refresh-preview-query.md +++ b/localizedContent/zh/content/getting-started/refresh-preview-query.md @@ -2,7 +2,7 @@ uid: refresh-preview-query title: 刷新、预览与查询数据 author: Daniel Otykier -updated: 2026-01-08 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -84,7 +84,15 @@ Tabular Editor 3 支持对不同对象类型执行刷新操作。 支持的刷 ![预览数据](~/content/assets/images/preview-data-big.png) -你可以打开多个此类表格预览,并在用户界面中按你的习惯随意排列。 此外,你还可以对单个列进行排序或筛选。 可预览的行数实际上没有限制。 Tabular Editor 只是在模型上执行一条 [`TOPNSKIP`](https://dax.guide/topnskip) DAX 查询,返回少量记录,用于填充当前视图。 +你可以打开多个此类表格预览,并在用户界面中按你的习惯随意排列。 此外,你还可以对单个列进行排序或筛选。 Tabular Editor 会针对模型执行 DAX 查询,只返回足以填充当前视图的一小部分记录,然后在你滚动时逐页加载更多行。 + +分页的工作方式取决于存储模式和引擎: + +- 在支持 [`WINDOW`](https://dax.guide/window) 函数的引擎中,对于 Import 表,分页会基于表的主键使用 `WINDOW`,因此你可以滚动浏览整张表。 +- 如果引擎不支持 `WINDOW`,或者表没有主键,预览将显示前几行,并提示无法滚动。 +- DirectQuery 表只显示前几行——无法分页——并会显示一条信息。 + +预览元数据会在当前会话中缓存,因此重新打开预览时不会再次查询服务器。 点击 **刷新** 以重新读取元数据,例如当模型已在 Tabular Editor 之外完成处理后。 如果一个或多个计算列处于无效状态,这些列会显示文本 _(需要计算)_。 你可以通过右键单击该列并选择 **重新计算表格...** 选项来重新计算表格。 From 7e28330cadadd1c71f6d0b366964ca22562564d0 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:36 +0200 Subject: [PATCH 12/49] New translations downloads.md (Chinese Simplified) [ci skip] --- .../zh/content/references/downloads.md | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/localizedContent/zh/content/references/downloads.md b/localizedContent/zh/content/references/downloads.md index 8ad847ace..1c1be4842 100644 --- a/localizedContent/zh/content/references/downloads.md +++ b/localizedContent/zh/content/references/downloads.md @@ -2,7 +2,7 @@ uid: downloads title: 全部下载 author: Daniel Otykier -updated: 2026-04-17 +updated: 2026-06-25 --- # Tabular Editor 3 下载 @@ -11,14 +11,14 @@ updated: 2026-04-17 ## 最新版本 -Tabular Editor 3.26.1 **.NET 8** 下载: +Tabular Editor 3.26.2 **.NET 8** 下载链接: -- 下载 [Tabular Editor 3.26.1(64 位)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.x64.Net8.exe) _(推荐)_ -- 下载 [Tabular Editor 3.26.1 (ARM64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.ARM64.Net8.exe) -- 便携版:[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.zip) -- MSI 版本:[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.msi), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.msi) +- 下载 [Tabular Editor 3.26.2(64 位)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe) _(推荐)_ +- 下载 [Tabular Editor 3.26.2(ARM64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) +- 便携版:[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) +- MSI 版:[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) -阅读 [最新发布说明](release-notes/3_26_1.md)。 +阅读[最新发布说明](release-notes/3_26_2.md)。 ## 安装说明 @@ -30,6 +30,10 @@ Tabular Editor 3.26.1 **.NET 8** 下载: ## 更新历史 +- 2026-06-25 **Tabular Editor 3.26.2**(_[发布说明](release-notes/3_26_2.md)_) + - .NET 8 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) + - .NET 8 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) + - .NET 8 安装程序(.msi):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) - 2026-04-17 **Tabular Editor 3.26.1** (_[发布说明](release-notes/3_26_1.md)_) - .NET 8 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.x64.Net8.exe), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.ARM64.Net8.exe) - .NET 8 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.zip) @@ -62,16 +66,5 @@ Tabular Editor 3.26.1 **.NET 8** 下载: - .NET 8 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.Installer.x64.Net8.exe),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.Installer.x86.Net8.exe) - .NET 8 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x64.Net8.zip),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x86.Net8.zip) - .NET 8 安装程序(.msi):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x64.Net8.msi),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.22.1.x86.Net8.msi) -- 2025-04-25 **Tabular Editor 3.21.0** (_[发布说明](release-notes/3_21_0.md)_) - - .NET 8 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.Installer.x64.Net8.exe),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.Installer.x86.Net8.exe) - - .NET 8 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x64.Net8.zip),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x86.Net8.zip) - - .NET 8 安装程序(.msi):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x64.Net8.msi),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.21.0.x86.Net8.msi) -- 2025-04-11 **Tabular Editor 3.20.1** (_[发布说明](release-notes/3_20_1.md)_) - - .NET 8 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x64.Net8.exe),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x86.Net8.exe) - - .NET 8 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.Net8.zip),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.Net8.zip) - - .NET 8 安装程序(.msi):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.Net8.msi),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.Net8.msi) - - .NET 6 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x64.exe),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.Installer.x86.exe) - - .NET 6 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.zip),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.zip) - - .NET 6 安装程序(.msi):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x64.msi),[x86](https://cdn.tabulareditor.com/files/TabularEditor.3.20.1.x86.msi) 如需更早版本,请参阅[完整发布历史](release-history.md)。 \ No newline at end of file From 33e5c27fac5d4e920f2abe67b3a46d4d8da673b3 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:41 +0200 Subject: [PATCH 13/49] New translations release-history.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/references/release-history.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/localizedContent/zh/content/references/release-history.md b/localizedContent/zh/content/references/release-history.md index 09f1bd67b..b3b24a0f3 100644 --- a/localizedContent/zh/content/references/release-history.md +++ b/localizedContent/zh/content/references/release-history.md @@ -5,6 +5,10 @@ title: 完整发布历史 # 完整发布历史 +- 2026-06-25 **Tabular Editor 3.26.2**(_[发行说明](release-notes/3_26_2.md)_) + - .NET 8 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) + - .NET 8 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) + - .NET 8 安装程序(.msi):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi),[ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) - 2026-04-17 **Tabular Editor 3.26.1** (_[发布说明](release-notes/3_26_1.md)_) - .NET 8 安装程序(.exe):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.x64.Net8.exe), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.Installer.ARM64.Net8.exe) - .NET 8 便携版(.zip):[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.1.ARM64.Net8.zip) From 90e87678fb83b15abec4485b1e08f5ead3b22341 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:44 +0200 Subject: [PATCH 14/49] New translations whats-new.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/references/whats-new.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localizedContent/zh/content/references/whats-new.md b/localizedContent/zh/content/references/whats-new.md index e483558a1..7a49ec21c 100644 --- a/localizedContent/zh/content/references/whats-new.md +++ b/localizedContent/zh/content/references/whats-new.md @@ -2,7 +2,7 @@ uid: whats-new title: 更新内容 author: Morten Lønskov -updated: 2026-03-19 +updated: 2026-06-24 --- - + From 64c98d462c68608220498c0dfeaf529e14dd8939 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:47 +0200 Subject: [PATCH 15/49] New translations udfs.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/tutorials/udfs.md | 33 ++++++++++++++++--- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/localizedContent/zh/content/tutorials/udfs.md b/localizedContent/zh/content/tutorials/udfs.md index 485656c98..43f000bfe 100644 --- a/localizedContent/zh/content/tutorials/udfs.md +++ b/localizedContent/zh/content/tutorials/udfs.md @@ -2,7 +2,7 @@ uid: udfs title: DAX 用户自定义函数 author: Daniel Otykier -updated: 2026-03-19 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -20,7 +20,7 @@ applies_to: # DAX 用户自定义函数 -DAX 用户自定义函数 (UDFs) 是语义模型的一项新功能,在 Power BI Desktop 的 2025 年九月更新中引入。 +DAX 用户自定义函数 (UDF) 是语义模型提供的一项能力。 该功能在 Power BI Desktop 2025 年九月更新中进入预览阶段,并自 Power BI 2026 年六月版本起[正式发布](https://community.fabric.microsoft.com/t5/Power-BI-Updates-Blog/DAX-User-Defined-Functions-Generally-Available/ba-p/5185738)。 该功能让你能够创建可复用的 DAX 函数,并可在模型中的任何 DAX 表达式里调用,甚至在其他函数中也能调用。 这个强大的功能可帮助你保持一致性、减少代码重复,并创建更易维护的 DAX 表达式。 @@ -133,8 +133,31 @@ ROW( 这些类型说明是可选的,但一旦指定,它们会对传入函数的参数执行隐式类型转换;同时,也会影响在 Tabular Editor 3 中编写调用该函数的 DAX 代码时的自动完成建议。 +Tabular Editor 3 会根据已声明的参数类型验证实参。 如果你调用 UDF 时传入的实参与其参数类型不匹配——例如,在需要 `TABLEREF` 参数的位置传入标量值——语义分析器会 Report 警告或错误。 + 可用约束的完整列表,请参阅 [Microsoft 的 UDF 规范](https://learn.microsoft.com/en-us/dax/best-practices/dax-user-defined-functions)。 +### 带默认表达式的可选参数 + +从 3.26.2 版本开始,Tabular Editor 3 支持带默认表达式的可选参数。 在参数名称后(以及任何类型或求值模式提示之后)追加 `= expression`,即可将该参数设为可选。 调用方省略该实参时,将由默认表达式提供其值。 + +```dax +FUNCTION AddTax = + ( + amount: NUMERIC, // 必需参数 + taxRate: NUMERIC = 0.1 // 可选参数,默认为 10% + ) + => amount * (1 + taxRate) +``` + +调用 `AddTax(10)` 会返回 `11`,而 `AddTax(10, 0.25)` 会返回 `12.5`。 + +可选参数遵循以下规则: + +- 调用方可以将实参留空,以回退到默认值,例如 `MyFunc(1,,3)` 省略了第二个实参。 最少参数个数由最右侧必需参数的位置决定。 +- 默认表达式只能引用在函数定义位置可见的名称(列、表、度量值、函数),并且不能引用同一函数的其他参数。 +- 只有在使用默认表达式时,才会按参数的类型提示进行类型检查;如果显式传入实参,则改为检查该实参是否符合该类型提示。 + ## 在模型中使用 UDF ### 在对象表达式中 @@ -311,15 +334,15 @@ Tabular Editor 3 会自动识别所有注释,并在自动完成建议和工具 **部署后函数无法正常工作** -- 确认目标环境支持 UDF(兼容级别 1702+)。 截至 2025 年九月十六日,Power BI 服务尚不支持 UDF,Azure Analysis Services 和 SQL Server Analysis Services 也同样不支持。 +- 确认目标环境支持 UDF(兼容级别 1702+)。 Power BI 服务自 2026 年六月版本起支持 UDF。 Azure Analysis Services 和 SQL Server Analysis Services 不支持 UDF。 ## 局限性 -- 并非所有 Power BI 环境都支持 UDF(需要特定构建版本) +- UDF 需要 1702 或更高的兼容级别;Azure Analysis Services 和 SQL Server Analysis Services 不支持 UDF - UDF 不能递归(调用自身) > [!NOTE] -> 截至 2026 年六月,UDF 已 [正式可用](https://community.fabric.microsoft.com/t5/Power-BI-Updates-Blog/DAX-User-Defined-Functions-Generally-Available/ba-p/5185738)。 作为其中的一部分,UDF 现已支持默认表达式和可选参数。 但是,在使用默认表达式语法时,Tabular Editor 3 目前会误报一条错误信息。 此问题将在 Tabular Editor 3 的下一次更新中修复。 +> 随着 UDF 于 2026 年六月[正式发布](https://community.fabric.microsoft.com/t5/Power-BI-Updates-Blog/DAX-User-Defined-Functions-Generally-Available/ba-p/5185738),UDF 支持带默认表达式的可选参数。 Tabular Editor 3 自 3.26.2 版本起支持此语法。 较旧版本在使用默认表达式语法时会显示误报的错误信息。 --- From 6a47a37ff43176a1bbcdd2ea1cc81b9e0990aa7e Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:51 +0200 Subject: [PATCH 16/49] New translations ai-assistant.md (Chinese Simplified) [ci skip] --- .../zh/content/features/ai-assistant.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/localizedContent/zh/content/features/ai-assistant.md b/localizedContent/zh/content/features/ai-assistant.md index 591cfe2ee..fd98941b0 100644 --- a/localizedContent/zh/content/features/ai-assistant.md +++ b/localizedContent/zh/content/features/ai-assistant.md @@ -2,7 +2,7 @@ uid: ai-assistant title: AI 助手 author: Morten Lønskov -updated: 2026-04-17 +updated: 2026-06-24 applies_to: products: - product: Tabular Editor 2 @@ -44,20 +44,20 @@ AI 助手采用自带密钥 BYOK 模式。 你只需从受支持的提供商中 ## 支持的提供程序 -在 **工具 > 偏好 > AI 助手 > AI 提供程序** 下配置 AI 提供程序。 从下拉列表中选择一个提供商——在你完成配置之前,默认是 **无(AI 已禁用)**——输入你的 API 密钥,并可按需替换默认模型。 对于 OpenAI 和 Anthropic,**模型名称** 字段是一个预先填入已知模型的组合框;你也可以输入自定义模型名称。 +在 **工具 > 偏好 > AI 助手 > AI 提供程序** 下配置 AI 提供程序。 从下拉列表中选择一个提供商——在你完成配置之前,默认是 **无(AI 已禁用)**——输入你的 API 密钥,并可按需替换默认模型。 对于 OpenAI 和 Anthropic,**模型名称**字段是一个预先填充了当前模型的下拉框——包括 Anthropic 的 `claude-fable-5` 和 `claude-opus-4-8`,以及 OpenAI 的 `gpt-5.5` 和 `gpt-5.5-pro`——这样你无需手动输入自定义 ID,也能直接选择较新的模型。 你也可以输入自定义模型名称。 -| 提供程序 | 默认模型 | 需要配置 | -| -------------- | ----------------- | ------------------------------ | -| OpenAI | gpt-4o | API 密钥。 可选:基础 URL、组织 ID 和项目 ID | -| Anthropic | claude-sonnet-4-6 | API 密钥。 可选:基础 URL | -| Azure OpenAI | 视部署而定 | API 密钥、端点 URL 和部署名称 | -| 自定义(兼容 OpenAI) | 由用户指定 | API 密钥和自定义端点 URL | +| 提供程序 | 默认模型 | 需要配置 | +| -------------- | ----------------------- | ------------------------------ | +| OpenAI | gpt-5.5 | API 密钥。 可选:基础 URL、组织 ID 和项目 ID | +| Anthropic | claude-sonnet-4-6 | API 密钥。 可选:基础 URL | +| Azure OpenAI | 视部署而定 | API 密钥、端点 URL 和部署名称 | +| 自定义(兼容 OpenAI) | 由用户指定 | API 密钥和自定义端点 URL | ![AI 助手提供程序偏好设置选择](~/content/assets/images/ai-assistant/ai-assistant-provider-preferences.png) ### OpenAI -将提供程序选择为 **OpenAI**,然后输入你的 API 密钥。 如果你的 OpenAI 账户使用组织 ID 和项目 ID,也可以选择填写这些信息。 默认模型是 **gpt-4o**,但你可以将其更改为你账户中可用的任意模型。 +将提供程序选择为 **OpenAI**,然后输入你的 API 密钥。 如果你的 OpenAI 账户使用组织 ID 和项目 ID,也可以选择填写这些信息。 默认模型为 **gpt-5.5**,但你可以将其更改为你账号下可用的任意模型。 ![AI 助手 OpenAI 配置](~/content/assets/images/ai-assistant/ai-assistant-openai-config.png) From 0a98eee8231b352d176e07137526d354f358583c Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 12:09:54 +0200 Subject: [PATCH 17/49] New translations 3_26_2.md (Chinese Simplified) [ci skip] --- .../references/release-notes/3_26_2.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 localizedContent/zh/content/references/release-notes/3_26_2.md diff --git a/localizedContent/zh/content/references/release-notes/3_26_2.md b/localizedContent/zh/content/references/release-notes/3_26_2.md new file mode 100644 index 000000000..bf2edc2fb --- /dev/null +++ b/localizedContent/zh/content/references/release-notes/3_26_2.md @@ -0,0 +1,120 @@ +--- +uid: release-3-26-2 +--- + +# Tabular Editor 3.26.2 + +# [**下载**](#tab/downloads) + +Tabular Editor 3.26.2 下载: + +- 下载 [Tabular Editor 3.26.2 (x64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe) _(推荐)_ +- 下载 [Tabular Editor 3.26.2 (ARM64)](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) +- 便携版:[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) +- MSI 版:[x64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi), [ARM64](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) + +_如果您之前未使用过 Tabular Editor 3,则可获得 30 天试用期,安装后即可激活。 你也可以 [购买许可证](https://tabulareditor.com/licensing)。_ + +# [**SHA-256 校验和**](#tab/checksums) + +| 文件 | .NET 运行时 | 平台 | SHA-256 | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ----- | ------------------------------------------------------------------ | +| [TabularEditor.3.26.2.Installer.x64.Net8.exe](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.x64.Net8.exe) | .NET 8 | x64 | `CDCEEF571902E58E3368F5A60BBF6926C310B34B2CC4ABA2F3D28B9A5C1C98AC` | +| [TabularEditor.3.26.2.x64.Net8.msi](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.msi) | .NET 8 | x64 | `D3C0FA8184855C57D16D78CD9D2A44A7622E3C67CD07CFDC7B6D0EA59FB30E09` | +| [TabularEditor.3.26.2.x64.Net8.zip](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.x64.Net8.zip) | .NET 8 | x64 | `B4A2B836E6DA359E798D7546934F1A477C2F4C74D653995D77D2F182A57A8725` | +| [TabularEditor.3.26.2.Installer.ARM64.Net8.exe](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.Installer.ARM64.Net8.exe) | .NET 8 | ARM64 | `7CC1E25D51EA665787500DC460BB533F457E26FF7AE5A4B9F44480F980F1998F` | +| [TabularEditor.3.26.2.ARM64.Net8.msi](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.msi) | .NET 8 | ARM64 | `A8A6E324D38E80140B171B5D7F84C5EBADD6AFE2810529504F332091ECF7E682` | +| [TabularEditor.3.26.2.ARM64.Net8.zip](https://cdn.tabulareditor.com/files/TabularEditor.3.26.2.ARM64.Net8.zip) | .NET 8 | ARM64 | `B265579D384A6586B7599CBC0A54032C5F477D3A485FC1F773F79D4B31D128C6` | + +*** + +请访问我们的 [发布博客](https://blog.tabulareditor.com/),快速了解本次发布最重要的更新。 + +## 3.26.2 版本改进 + +- 已在 TOM Explorer 中为表添加 **移到组** 右键子菜单。 该子菜单会列出现有表格组、一个 **(New...)** 条目(使用所选表创建新组并打开名称编辑器),以及一个 **(None)** 条目(移除表格组分配)。 + +- 已用最新版本更新 AI Assistant 偏好设置中的模型预设,用户无需输入自定义模型 ID 即可选择当前模型。 已添加 Anthropic 的 `claude-fable-5` 和 `claude-opus-4-8`,以及 OpenAI 的 `gpt-5.5`/`gpt-5.5-pro` 和其他当前的 GPT-5 变体。 已移除弃用条目(例如较旧的 Codex 变体),默认 OpenAI 模型现为 `gpt-5.5`。 + +- **Semantic Analyzer 改进** + - 新增对 DAX UDF 中带默认表达式的可选参数的支持。 + - 当调用 UDF 时传入的参数与其声明类型不匹配(例如向 `TABLEREF` 参数传递标量值等),Semantic Analyzer 现在会发出合适的警告 / 错误信息 + - Semantic Analyzer 现在会在 `IGNORE` 未直接用作 `SUMMARIZECOLUMNS` 的表达式参数、而被用于其他位置时报告错误,与引擎行为一致。 + - Semantic Analyzer 现已支持 Power BI Desktop 2026 年四月版为 `NAMEOF` 函数引入的新可选 component 参数和 escaping 参数。 有效的 component 关键字为 `TABLE`、`COLUMN`、`MEASURE`、`CALENDAR`、`FULL`、`SELF`、`PARENT`;有效的 escaping 关键字为 `ESCAPED`、`UNESCAPED`、`MINIMALLYESCAPED`。 返回类型保持不变(标量字符串)。 例如,`EVALUATE { NAMEOF([MyMeasure], TABLE, MINIMALLYESCAPED) }` 会返回完全限定度量值引用中的表名部分。 + +- **Semantic Bridge 改进** + - 现在,导入 Databricks Metric View 时会将该视图的元数据一并带入语义模型。 + - `comment` 会成为模型、维度和度量值的描述。 + - `display_name` 会成为 TOM 模型中面向用户显示的名称;如果未定义 `display_name`,则回退到 `name`。 + - 度量值和维度的 `format` 会转换为 TOM 的 FormatString,并根据该格式推断生成的列或度量值的 DataType(货币、百分比、日期等)。 + 对于没有明确 TOM 对应项的格式规范,会回退到合理的默认值,并显示警告。 + - SQL 到 DAX 的翻译已改进:行计数 (`COUNT(*)`)、`MEASURE(name)` 引用、二元运算、字面量(包括 `NULL` -> `BLANK()`)、将 `/` 映射为可安全处理空白值的 `DIVIDE`,以及括号优先级现在都能更准确地转换。 + - 不在已识别集合内的表达式仍会回退为原样 SQL,并附带警告。 + - 翻译后的 DAX 仅为尽力而为的结果——部署前先审核并验证。 + - 已添加对带嵌套联接的雪花架构的支持。 + - YAML 反序列化现同时接受顶层的 `fields:` 和 `dimensions:`:Databricks v1.1 规范将它们视为别名。 + 往返转换会保留源 YAML 中使用的关键字。 在 TE3 中创建的视图(没有源 YAML)在 v1.1 及更早版本中默认使用 `dimensions:`:`fields:` 别名是在 v1.1 规范发布后才引入的,因此我们保持与面向原始 1.1 规范的工具兼容。 + 当 v1.1+ 视图使用 `dimensions:` 时,会显示反序列化警告(规范在 v1.1+ 中将 `fields:` 标记为首选);同样,当 v1.1 之前的视图使用 `fields:` 时,也会显示对应警告。 + - C# 脚本界面将 `Dimension` 重命名为 `Field`(`view.Fields`, `view.AddField`, `Dimension` -> `Field`, `MakeValidationRuleForDimension` -> `MakeValidationRuleForField`, `ctx.DimensionNames` -> `ctx.FieldNames`)。 + - 旧名称仍作为已弃用的转发别名保留,依然可以编译和运行,但会显示弃用警告,因此现有脚本以及诸如 `Model.Dimensions["x"]` 这样的已存储路径仍然可用。 + - 窗口度量值(包括 v1.1 的 `offset:` 字段)在进行 YAML 反序列化/序列化往返时会被保留。 对于规范标记为实验性的功能,我们暂不进行转换;YAML 往返会保留它们,以免丢失。 + - 根据更新后的 v1.1 规范,联接现已支持两个新属性: + - 支持 `rely:` 映射 + - `cardinality:` 字段可往返保留两种规范值(`many_to_one`、`one_to_many`)以及省略该字段的形式。 + 遇到未知值时,会回退为 `many_to_one` 并发出警告。 + - 声明为 `cardinality: one_to_many` 的联接仍会导入,但会有意跳过与源的关系——v1.1 规范将这类联接视为独立的事实源,并在源粒度上分别聚合。 + 仍会创建联接表,使其出现在生成的 TOM 模型中,但不会定义任何关系。 + 每个受影响的联接都会显示一条警告,说明这一差异。 + +## 3.26.2 中的缺陷修复 + +- 修复了 AI 聊天在 Anthropic Claude Opus 4.7+ 和 Fable 5 上因不再支持 temperature 采样参数而报 `BadRequest` 错误(“temperature is deprecated for this model”)的问题。 这套重试逻辑现在除了此前已处理的情况外,也能识别该提供商的这类措辞,并在不显式指定 temperature 的情况下透明地重新发送请求。 + +- 在 `NAMEOF` 和 `TABLEOF` 函数的自动完成建议中,现在也会提供日历,与表、列和度量值一起显示。 这也包括尚未配置时间单位列的日历(例如刚添加、还未配置的日历),它们此前会被遗漏。 现在,输入带引号的前缀(例如 `'My Cal`)时,也会像表一样,把建议范围缩小到匹配的日历。 + +- 表格 **Data Preview** 中的排序和分页现在在各种存储模式下都更加可靠: + +- 按没有属性层次结构的列排序时,不会再返回顺序错误的行。 在可能的情况下,分页现在会使用 `WINDOW` 函数(适用于支持该函数的引擎,以及具有主键的表);否则,预览将显示前几行,并提示已禁用滚动。 + +- 属性层次结构的可用性现在直接从服务器读取,因此即使模型在 Tabular Editor 之外被处理后,信息仍然准确。 + +- DirectQuery 表现在会正确显示前几行(DirectQuery 不支持分页),并附带一条信息。 + +- 预览元数据会在当前会话中缓存,并且仅在你单击 **刷新** 时更新,从而避免多余的服务器往返(包括重复的行计数查询)。 + +- 当无法根据模型解析所属表时,DAX 格式化程序不再从 `DEFINE MEASURE` 块中移除表限定符。 此前,这可能会把有效的 `MEASURE 'Sales'[Amount] = ...` 变成无效的 `MEASURE [Amount] = ...`,从而导致语句无效。 + +- 当将筛选器移除函数(`ALL`、`ALLSELECTED`、`REMOVEFILTERS` 或 `ALLCROSSFILTERED`)用作 DAX 用户定义函数的顶层主体表达式时,语义分析器不再误报错误,例如 `FUNCTION F = () => REMOVEFILTERS('Sales')`。 此类 UDF 在作为 `CALCULATE` 的 FILTER 参数调用时是有效的。 无效用法仍会在调用处被报告;关系修饰符(`CROSSFILTER` / `USERELATIONSHIP`)以及 `KEEPFILTERS` 作为 UDF 函数体时仍然无效,与引擎行为一致。 + +- 在重命名被 NAMEOF 函数调用引用的表时,公式修复现在会正确更新该表引用。 + +- 当将 `TABLEOF(...)` 作为表引用参数传递给 `ALL`、`ALLEXCEPT`、`ALLSELECTED`、`ALLNOBLANKROW`、`ALLCROSSFILTERED` 或 `REMOVEFILTERS` 时,语义分析器不再误报错误。 + +- **更新表架构** 操作现在在对混合对象类型执行或在表格组上执行时,行为都能正确。 + +--- + +## 从 Tabular Editor 2.x 迁移过来? + +观看 [此视频](https://youtu.be/O4ATwdzCvWc),快速了解 Tabular Editor 3 的主要功能。 另外,也请务必查看我们的[上手指南](https://docs.tabulareditor.com/onboarding/index.html)。 + +**Tabular Editor 3 主要功能概览:** + +- 完全可自定义的 IDE,支持多显示器、Hi-DPI 和主题切换 +- 全新的强大 DAX 代码编辑器,具备自动完成、语法检查、代码折叠等众多功能 +- \*工作区模式,可将更改保存到磁盘,并同时将模型元数据同步到 Analysis Services +- \*通过无限滚动预览表数据,创建 PivotGrid,或编写 DAX 查询来浏览模型或测试计算逻辑 +- \*设置数据定时刷新 +- 同时更新 Provider 和 Structured数据源的表架构(没错,连 M 查询也支持!) +- 创建 Data model 图 +- 创建 DAX 脚本,使您能够在单个文档中编辑多个度量值或其他计算对象 +- 录制 C# Script 并保存为宏(以前称为“自定义操作”) +- VertiPaq分析器集成 +- DAX调试器 +- 集成 DAX优化器 +- 代码操作:轻松重构你的 DAX 代码。 + +\*=仅在连接到 Analysis Services 或 Power BI 实例时可用 + +--- + From 6c9e3ad569b665321c45d4d46b468599086a90ba Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 13:17:16 +0200 Subject: [PATCH 18/49] New translations 3_26_2.md (Spanish) [ci skip] --- .../es/content/references/release-notes/3_26_2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localizedContent/es/content/references/release-notes/3_26_2.md b/localizedContent/es/content/references/release-notes/3_26_2.md index d7750b7bc..764f004ef 100644 --- a/localizedContent/es/content/references/release-notes/3_26_2.md +++ b/localizedContent/es/content/references/release-notes/3_26_2.md @@ -28,7 +28,7 @@ _Si aún no has usado Tabular Editor 3, tienes derecho a una prueba de 30 días, *** -Echa un vistazo a nuestro [blog de lanzamientos](https://blog.tabulareditor.com/) para ver un breve resumen de las actualizaciones más importantes de esta versión. +Check out our [release blog](https://tabulareditor.com/blog/tabular-editor-3-june-2026-release) to get a brief overview of the most important updates in this release. ## Mejoras en la versión 3.26.2 @@ -40,7 +40,7 @@ Echa un vistazo a nuestro [blog de lanzamientos](https://blog.tabulareditor.com/ - Se agregó compatibilidad con parámetros opcionales con expresiones predeterminadas en las UDF de DAX. - El analizador semántico ahora emite mensajes de advertencia o error adecuados cuando se llama a una UDF con un parámetro que no coincide con su tipo declarado (por ejemplo, al pasar un valor escalar a un parámetro `TABLEREF`, etc.) - El analizador semántico ahora informa de un error cuando `IGNORE` se usa en cualquier lugar que no sea directamente como argumento de expresión de `SUMMARIZECOLUMNS`, en consonancia con el comportamiento del motor. - - El analizador semántico ahora admite el nuevo componente opcional y los parámetros de escape introducidos para la función `NAMEOF` en Power BI Desktop de abril de 2026. Las palabras clave de componente válidas son `TABLE`, `COLUMN`, `MEASURE`, `CALENDAR`, `FULL`, `SELF`, `PARENT`; las palabras clave de escape válidas son `ESCAPED`, `UNESCAPED`, `MINIMALLYESCAPED`. El tipo de valor devuelto no cambia (cadena escalar). Por ejemplo, `EVALUATE { NAMEOF([MyMeasure], TABLE, MINIMALLYESCAPED) }` devuelve el componente del nombre de la tabla de una referencia de medida totalmente calificada. + - El analizador semántico ahora admite el nuevo componente opcional y los parámetros de escape introducidos para la función `NAMEOF` en Power BI Desktop de abril de 2026. Las palabras clave de componente válidas son `TABLE`, `COLUMN`, `MEASURE`, `CALENDAR`, `FULL`, `SELF`, `PARENT`; las palabras clave de escape válidas son `ESCAPED`, `UNESCAPED`, `MINIMALLYESCAPED`. El tipo de valor devuelto no cambia (cadena escalar). Por ejemplo, `EVALUATE { NAMEOF([MyMeasure], TABLE, MINIMALLYESCAPED) }` devuelve el componente del nombre de la tabla de una referencia de medida totalmente calificada.

- **Mejoras de Semantic Bridge** - Al importar una Databricks Metric View, ahora se incorporan los metadatos de la vista al modelo semántico. From cda54b2ab66ca7cd22f286ca07becd438f230bcf Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 13:17:19 +0200 Subject: [PATCH 19/49] New translations 3_26_2.md (Chinese Simplified) [ci skip] --- .../zh/content/references/release-notes/3_26_2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localizedContent/zh/content/references/release-notes/3_26_2.md b/localizedContent/zh/content/references/release-notes/3_26_2.md index bf2edc2fb..e2b455960 100644 --- a/localizedContent/zh/content/references/release-notes/3_26_2.md +++ b/localizedContent/zh/content/references/release-notes/3_26_2.md @@ -28,7 +28,7 @@ _如果您之前未使用过 Tabular Editor 3,则可获得 30 天试用期, *** -请访问我们的 [发布博客](https://blog.tabulareditor.com/),快速了解本次发布最重要的更新。 +Check out our [release blog](https://tabulareditor.com/blog/tabular-editor-3-june-2026-release) to get a brief overview of the most important updates in this release. ## 3.26.2 版本改进 @@ -40,7 +40,7 @@ _如果您之前未使用过 Tabular Editor 3,则可获得 30 天试用期, - 新增对 DAX UDF 中带默认表达式的可选参数的支持。 - 当调用 UDF 时传入的参数与其声明类型不匹配(例如向 `TABLEREF` 参数传递标量值等),Semantic Analyzer 现在会发出合适的警告 / 错误信息 - Semantic Analyzer 现在会在 `IGNORE` 未直接用作 `SUMMARIZECOLUMNS` 的表达式参数、而被用于其他位置时报告错误,与引擎行为一致。 - - Semantic Analyzer 现已支持 Power BI Desktop 2026 年四月版为 `NAMEOF` 函数引入的新可选 component 参数和 escaping 参数。 有效的 component 关键字为 `TABLE`、`COLUMN`、`MEASURE`、`CALENDAR`、`FULL`、`SELF`、`PARENT`;有效的 escaping 关键字为 `ESCAPED`、`UNESCAPED`、`MINIMALLYESCAPED`。 返回类型保持不变(标量字符串)。 例如,`EVALUATE { NAMEOF([MyMeasure], TABLE, MINIMALLYESCAPED) }` 会返回完全限定度量值引用中的表名部分。 + - Semantic Analyzer 现已支持 Power BI Desktop 2026 年四月版为 `NAMEOF` 函数引入的新可选 component 参数和 escaping 参数。 有效的 component 关键字为 `TABLE`、`COLUMN`、`MEASURE`、`CALENDAR`、`FULL`、`SELF`、`PARENT`;有效的 escaping 关键字为 `ESCAPED`、`UNESCAPED`、`MINIMALLYESCAPED`。 返回类型保持不变(标量字符串)。 例如,`EVALUATE { NAMEOF([MyMeasure], TABLE, MINIMALLYESCAPED) }` 会返回完全限定度量值引用中的表名部分。

- **Semantic Bridge 改进** - 现在,导入 Databricks Metric View 时会将该视图的元数据一并带入语义模型。 From d7ce99f79909f3c81df4907cfb536cc96cd6d8f3 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 14:32:20 +0200 Subject: [PATCH 20/49] New translations 3_26_2.md (Spanish) [ci skip] --- localizedContent/es/content/references/release-notes/3_26_2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/es/content/references/release-notes/3_26_2.md b/localizedContent/es/content/references/release-notes/3_26_2.md index 764f004ef..e8e557548 100644 --- a/localizedContent/es/content/references/release-notes/3_26_2.md +++ b/localizedContent/es/content/references/release-notes/3_26_2.md @@ -28,7 +28,7 @@ _Si aún no has usado Tabular Editor 3, tienes derecho a una prueba de 30 días, *** -Check out our [release blog](https://tabulareditor.com/blog/tabular-editor-3-june-2026-release) to get a brief overview of the most important updates in this release. +Echa un vistazo a nuestro [blog del lanzamiento](https://tabulareditor.com/blog/tabular-editor-3-june-2026-release) para obtener una breve visión general de las actualizaciones más importantes de este lanzamiento. ## Mejoras en la versión 3.26.2 From 2ed2570294b5d663359cb497c06b7c89597b6045 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 25 Jun 2026 14:32:23 +0200 Subject: [PATCH 21/49] New translations 3_26_2.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/references/release-notes/3_26_2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/zh/content/references/release-notes/3_26_2.md b/localizedContent/zh/content/references/release-notes/3_26_2.md index e2b455960..035c5a0d5 100644 --- a/localizedContent/zh/content/references/release-notes/3_26_2.md +++ b/localizedContent/zh/content/references/release-notes/3_26_2.md @@ -28,7 +28,7 @@ _如果您之前未使用过 Tabular Editor 3,则可获得 30 天试用期, *** -Check out our [release blog](https://tabulareditor.com/blog/tabular-editor-3-june-2026-release) to get a brief overview of the most important updates in this release. +查看我们的[发布博客](https://tabulareditor.com/blog/tabular-editor-3-june-2026-release),简要了解本次发布中最重要的更新。 ## 3.26.2 版本改进 From 30a6ddf8dfae30edc9f2dfa6931df57589575bc8 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:01 +0200 Subject: [PATCH 22/49] New translations te-cli-commands.md (Spanish) [ci skip] --- .../features/te-cli/te-cli-commands.md | 345 +++++++++++------- 1 file changed, 223 insertions(+), 122 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-commands.md b/localizedContent/es/content/features/te-cli/te-cli-commands.md index 92303da9b..405ab3645 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-commands.md +++ b/localizedContent/es/content/features/te-cli/te-cli-commands.md @@ -31,8 +31,8 @@ te bpa run --help # Help for a command with subcommands El direccionamiento de objetos en la CLI usa una única gramática compartida por todos los comandos. En la referencia siguiente aparecen dos tipos de ruta: -- **``**: identifica **exactamente un** objeto o contenedor. Lo usan los comandos que operan sobre un único destino: `te get`, `te set`, `te add`, `te rm`, `te mv`, `te format -p`, `te deps`, `te macro run --on`. -- **``**: identifica **cero o más** objetos y admite comodines. Lo usan los comandos que operan sobre un conjunto: `te ls`, `te bpa run --path` y otros comandos de tipo inspección. +- **``**: identifica **exactamente un** objeto o contenedor. Used by commands that operate on a single target: `te get`, `te set`, `te add`, `te remove`, `te move`, `te format -p`, `te deps`, `te macro run --on`. +- **``**: identifica **cero o más** objetos y admite comodines. Used by commands that operate on a set: `te list`, `te bpa run --path`, and other inspection-style commands. Ambas formas de ruta comparten las mismas reglas de sintaxis; solo se diferencian en dos puntos: @@ -43,9 +43,9 @@ Ambas formas de ruta comparten las mismas reglas de sintaxis; solo se diferencia Una ruta es una secuencia de **segmentos** separados por barras. Cada segmento nombra un único paso: una tabla, un objeto hijo o una palabra clave de contenedor. -- `Sales` — un segmento -- `Sales/Revenue` — dos segmentos -- `Roles/Admin/Members/bob` — cuatro segmentos +- `Sales` - one segment +- `Sales/Revenue` - two segments +- `Roles/Admin/Members/bob` - four segments La entrada vacía y `.` significan «la raíz del modelo»: el punto de partida implícito para las rutas de filtro y el sujeto explícito de las consultas del tipo `te get .`. @@ -101,39 +101,39 @@ Pon un segmento entre comillas para forzar la coincidencia literal del nombre cu ### Comodines en rutas de filtro -Las rutas de filtro añaden un único carácter comodín - `*` - que coincide con cualquier secuencia de caracteres dentro de un solo segmento (codicioso, de un solo segmento). Los comodines permiten que `te ls` y comandos similares acoten los resultados. +Las rutas de filtro añaden un único carácter comodín - `*` - que coincide con cualquier secuencia de caracteres dentro de un solo segmento (codicioso, de un solo segmento). Wildcards are how `te list` and similar commands narrow their results. ```bash -te ls 'Sa*' # Tables whose name starts with Sa -te ls 'Sales/*Amount' # Children of Sales whose name ends with Amount -te ls '*/Amount' # An Amount column/measure across every table -te ls 'Roles/Re*/Members' # Members of every role matching Re* +te list 'Sa*' # Tables whose name starts with Sa +te list 'Sales/*Amount' # Children of Sales whose name ends with Amount +te list '*/Amount' # An Amount column/measure across every table +te list 'Roles/Re*/Members' # Members of every role matching Re* ``` -Una ruta de filtro con **N segmentos** produce resultados con **N niveles de profundidad**; los comodines nunca amplían automáticamente un nivel más allá de lo que hayas escrito. El atajo de un solo segmento `te ls Sales` es la excepción: un nombre de tabla sin calificar y sin comodines se expande a los elementos secundarios directos de la tabla para ajustarse a la intención de "muéstrame qué hay en Sales". En cambio, `te ls Sa*` devuelve solo las tablas coincidentes, sin expansión. +Una ruta de filtro con **N segmentos** produce resultados con **N niveles de profundidad**; los comodines nunca amplían automáticamente un nivel más allá de lo que hayas escrito. The single-segment shortcut `te list Sales` is the exception: an unqualified, non-wildcarded table name expands to the table's direct children to match the "show me what's in Sales" intent. `te list Sa*`, in contrast, returns just the matching tables - no expansion. El sufijo entre corchetes de DAX se rechaza en las rutas de filtro; pon entre comillas los nombres que contengan `[` y `]` si necesitas que coincidan literalmente. ### Errores y sugerencias -Los segmentos mal escritos generan un error contextual con una sugerencia de "quizás quisiste decir" cuando la CLI puede deducir lo que querías decir. Las rutas a las que les falta el elemento padre fallan antes de la comprobación del elemento hoja, así que los mensajes señalan el segmento que realmente está mal. Los contenedores vacíos (por ejemplo, `te ls Hierarchies` en un modelo sin jerarquías) muestran un simple mensaje de "no hay nada aquí" en lugar de un error. +Los segmentos mal escritos generan un error contextual con una sugerencia de "quizás quisiste decir" cuando la CLI puede deducir lo que querías decir. Las rutas a las que les falta el elemento padre fallan antes de la comprobación del elemento hoja, así que los mensajes señalan el segmento que realmente está mal. Empty containers (e.g., `te list Hierarchies` on a model without hierarchies) emit a simply "nothing here" hint rather than an error. ## Opciones globales Estas opciones están disponibles en todos los comandos y se pueden usar antes o después del nombre del subcomando. -| Opción | Descripción | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-m, --model ` | Ruta al modelo semántico (carpeta TMDL, archivo `.bim` o carpeta de TE). | -| `-s, --server ` | Nombre del Workspace o punto de conexión (p. ej., `MyWorkspace`, `powerbi://...`, `asazure://...`, `localhost`). | -| `-d, --database ` | Nombre del modelo semántico en el Workspace. | -| `--local` | Conecta a una instancia de Power BI Desktop en ejecución local (solo Windows). | -| `--auth ` | Método de autenticación: `auto`, `interactive`, `spn`, `env`, `managed-identity` (predeterminado: `auto`). | -| `--output-format ` | Formato de Stdout: `text` (predeterminado), `json`, `csv`, `tmsl` (alias `bim`), `tmdl`. `csv` se respeta en los comandos que emiten datos tabulares; `tmsl`/`tmdl` solo se respeta en `te get` y `te ls` para la serialización de objetos completos. Los comandos rechazan los formatos que no admiten. | -| `--error-format ` | Formato de stderr para errores, advertencias y sugerencias: `text` (predeterminado) o `json`. Para cualquier otro valor, se usa `text`. Es independiente de `--output-format`, así que puedes combinar stdout en JSON con errores en texto sin formato (o viceversa). | -| `--recent [N]` | Usa un modelo que hayas usado recientemente. Sin valor = selector interactivo; `N` = el N-ésimo más reciente (1 = el último usado). | -| `--non-interactive` | Desactiva todas las indicaciones interactivas. Finaliza con un error accionable si falta algún dato obligatorio. | -| `--debug` | Habilita el registro de depuración en stderr (cadenas de conexión, flujo de autenticación, tiempos). | +| Opción | Descripción | +| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `-m, --model ` | Path to semantic model (TMDL folder, `.bim` file, `database.json` folder, or `.SemanticModel` folder). | +| `-s, --server ` | Nombre del Workspace o punto de conexión (p. ej., `MyWorkspace`, `powerbi://...`, `asazure://...`, `localhost`). | +| `-d, --database ` | Nombre del modelo semántico en el Workspace. | +| `--local` | Conecta a una instancia de Power BI Desktop en ejecución local (solo Windows). | +| `--auth ` | Método de autenticación: `auto`, `interactive`, `spn`, `env`, `managed-identity` (predeterminado: `auto`). | +| `--output-format ` | Formato de Stdout: `text` (predeterminado), `json`, `csv`, `tmsl` (alias `bim`), `tmdl`. `csv` is honored by commands that emit tabular data; `tmsl`/`tmdl` only by `te get` and `te list` for whole-object serialization. Los comandos rechazan los formatos que no admiten. | +| `--error-format ` | Formato de stderr para errores, advertencias y sugerencias: `text` (predeterminado) o `json`. Para cualquier otro valor, se usa `text`. Es independiente de `--output-format`, así que puedes combinar stdout en JSON con errores en texto sin formato (o viceversa). | +| `--recent [N]` | Usa un modelo que hayas usado recientemente. Sin valor = selector interactivo; `N` = el N-ésimo más reciente (1 = el último usado). | +| `--non-interactive` | Desactiva todas las indicaciones interactivas. Finaliza con un error accionable si falta algún dato obligatorio. | +| `--debug` | Habilita el registro de depuración en stderr (cadenas de conexión, flujo de autenticación, tiempos). | `te --version` muestra la versión de la CLI y sale. @@ -141,11 +141,17 @@ En los comandos que leen un modelo, el orden de resolución es: el argumento posicional `` → la opción global `--model` → `--server`/`--database` (remoto) → conexión activa de `te connect` → `--recent`. +> [!NOTE] +> **Mistyped options are rejected up front.** If you pass a `--flag` that isn't recognised on the command you invoked, the CLI exits with an actionable error rather than silently absorbing the token as a positional argument. This catches typos like `--force ` accidentally becoming `--forec` in CI scripts. + +> [!NOTE] +> **Dotted server names.** `-s`/`--server` treats a dotted name (e.g. `Sales.2026`) as an Analysis Services server hostname, not a Power BI workspace. A warning fires when the CLI has to make this call, with a hint to append `.Workspace` (e.g. `Sales.2026.Workspace`) or use a full `powerbi://` URL if you meant the Power BI workspace. Applies to `te connect`, `te deploy`, `te refresh`, `te query`, `te vertipaq`, and `te test run`. + ## E/S del modelo ### load -Carga un modelo semántico y muestra un resumen del modelo: nombre, nivel de compatibilidad y recuentos generales de objetos (tablas, medidas, columnas). +Load a semantic model and display a summary of the model - name, compatibility level, and high-level object counts (tables, measures, columns). ```bash te load ./model # TMDL folder @@ -159,8 +165,8 @@ Guarda un modelo en disco. Úsalo para escribir en archivos locales un modelo de `te save` acepta: -- `-o, --output-path ` - archivo o carpeta de destino. **Opcional** - si se omite, `te save` vuelve a escribir en la ubicación de origen y conserva el formato original. -- `--serialization ` - `tmdl`, `bim`, `te-folder`, `pbip`, `database.json`. De forma predeterminada, se deduce a partir del modelo cargado (origen BIM → BIM, TMDL `SemanticModel/` → TMDL en `definition/`). +- `-o, --output-path ` - archivo o carpeta de destino. **Opcional** - si se omite, `te save` vuelve a escribir en la ubicación de origen y conserva el formato original. The file extension also drives format inference: `.bim` writes a single-file BIM, `.json` writes a `database.json` folder, and a bare path writes a TMDL folder. +- `--serialization ` - `tmdl`, `bim` (alias `tmsl`), `database.json`, `pbip`. When omitted, the format is inferred from the `-o` path extension (or from the loaded model when `-o` is omitted entirely). - `--force` - omite la validación y sobrescribe la salida existente. Algunos rechazos (contenedores ambiguos, raíces de proyecto con varios `SemanticModel`) siguen ocurriendo incluso con `--force`. - `--skip-bpa` - omite por completo el control de BPA. - `--fix-bpa` - corrige automáticamente las infracciones de BPA cuando las reglas definen una expresión de corrección. @@ -180,10 +186,12 @@ te save -o ./out -s my-workspace -d my-model --skip-validation # Fast download ### open -Abre un modelo en la aplicación de escritorio de Tabular Editor 3. **Solo para Windows** (requiere que TE3 esté instalado). +Abre un modelo en la aplicación de escritorio de Tabular Editor 3. **Solo para Windows** (requiere que TE3 esté instalado). With no arguments, launches TE3 with a blank workspace. ```bash -te open ./my-model +te open # Launch TE3 with a blank workspace +te open ./my-model # Open a TMDL folder in TE3 +te open ./model.bim # Open a BIM file in TE3 ``` ### init @@ -196,7 +204,7 @@ Crea un nuevo modelo semántico vacío en la ruta especificada. De forma predete - `--compatibility-mode ` - `PowerBI` (predeterminado) o `AnalysisServices`. - `--compatibility-level ` (alias `--compat`) - nivel de compatibilidad. De forma predeterminada, usa `1702` cuando el modo es `PowerBI`; `1500` en caso contrario. Consulta @update-compatibility-level. - `--name ` - nombre del modelo o de la base de datos (predeterminado: el nombre del directorio). -- `--serialization ` - `tmdl` (predeterminado), `bim`, `te-folder`, `pbip`. +- `--serialization ` - `tmdl` (default), `bim` (alias `tmsl`), `database.json`, `pbip`. - `--force` - reemplaza cualquier archivo o directorio existente en la ruta de destino. ```bash @@ -214,14 +222,18 @@ Establece una propiedad en un objeto del modelo. Acepta un argumento ``. `te set` acepta: -- `-q ` - nombre de la propiedad (por ejemplo, `expression`, `formatString`, `description`, `isHidden`). -- `-i ` - valor (usa `-` para leer desde stdin). +- `-q ` - nombre de la propiedad (por ejemplo, `expression`, `formatString`, `description`, `isHidden`). **Repeatable** - pair each `-q` with a following `-i` to set multiple properties in one command. +- `-i ` - valor (usa `-` para leer desde stdin). One `-i` per `-q`. +- `-t, --type ` - disambiguation when the same path could resolve to multiple object kinds (`Measure`, `Column`, `CalculatedColumn`, `Hierarchy`, `Calendar`, `Partition`, `CalculationItem`). - `--save` / `--save-to ` - guarda los cambios. +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). +- `--force` - save even if the mutation introduces DAX validation errors. ```bash te set Sales/Amount -q expression -i "SUM(Sales[Amt])" --save te set "'Net Sales'[Sales Amount]" -q formatString -i "#,0" --save # DAX form with spaced names te set Sales -q isHidden -i true --save +te set Sales/Amount -q formatString -i "#,0" -q description -i "Net sales" --save # Multi-property ``` ### add @@ -231,7 +243,15 @@ Agrega un objeto al modelo. Especifica un `` para el nuevo objeto (el elem `te add` acepta: - `-t, --type `: tipo de objeto. Valores comunes: `Table`, `Measure`, `Column`, `CalculatedColumn`, `Hierarchy`, `Role`, `Perspective`, `Culture`, `CalculationGroup`, `CalculationItem`. Se admite el autocompletado con la tecla Tab; la lista completa se puede obtener ejecutando `te add --help`. +- `-i ` - expression or value to assign to the new object (DAX for measures/calculated columns, M for partitions, etc.). Pair with `-q` to set additional properties on the new object in the same command. +- `-q ` - additional property to set on the new object (repeatable; pairs with `-i`). +- `--file ` - read the expression for `-i` from a file instead of inline. +- `--mode ` - storage mode for new tables: `import` (default), `directQuery`, `dual`, `directLake`. - `--if-not-exists` - sale con código `0` sin error si el objeto ya existe. Úsalo en canalizaciones de CI/CD idempotentes. +- `--save` / `--save-to ` - guarda los cambios. +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). +- `--source-type ` - initial partition source type on a new table: `m`, `query`, or `calculated`. Overrides heuristic detection. `calculated` is only valid with `-t CalculatedTable`. +- `--force` - save even if the mutation introduces DAX validation errors. ```bash te add Sales/Revenue -t Measure -i "SUM(Sales[Amount])" --save @@ -244,32 +264,42 @@ te add Roles/Reader -t Role --save # New En las tablas vinculadas a datos, `te add` también admite la detección del esquema desde orígenes SQL, Lakehouse o Warehouse. Consulta `te add --help` para ver `--source`, `--endpoint`, `--source-table`, `--columns`, etc. -### rm +### remove -Elimina un objeto. De forma predeterminada, comprueba las dependencias para evitar romper referencias existentes. +Elimina un objeto. De forma predeterminada, comprueba las dependencias para evitar romper referencias existentes. (Alias: `rm`.) -`te rm` acepta: +`te remove` accepts: -- `` — argumento posicional: el objeto que se va a eliminar. -- `--force` — omite la comprobación de objetos dependientes. -- `--if-exists` — sale con código `0` sin error si el objeto no existe. Úsalo en canalizaciones de CI/CD idempotentes. -- `--dry-run` — muestra una vista previa de la eliminación sin aplicarla. -- `--save` — guarda el cambio en el modelo cargado. +- `` - positional argument: the object to remove. +- `-t, --type ` - desambigua cuando la ruta coincide con varios elementos secundarios de una tabla (p. ej., una columna y una jerarquía con el mismo nombre). +- `--force` - bypass the dependents check. +- `--if-exists` - exit `0` without error if the object doesn't exist. Úsalo en canalizaciones de CI/CD idempotentes. +- `--dry-run` - preview the removal without applying it. +- `--save` / `--save-to ` - persist the change. +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). ```bash -te rm Sales/Revenue --save -te rm "'Sales'[Revenue]" --save # DAX form -te rm Sales/Revenue --dry-run # Preview only -te rm Sales/OldMeasure --if-exists --save # Idempotent +te remove Sales/Revenue --save +te remove "'Sales'[Revenue]" --save # DAX form +te remove Sales/Revenue --dry-run # Preview only +te remove Sales/OldMeasure --if-exists --save # Idempotent ``` -### mv +### move + +Mueve o renombra un objeto del modelo. Tanto el origen como el destino son argumentos ``. (Aliases: `mv`, `rename`.) + +`te move` accepts: -Mueve o renombra un objeto del modelo. Tanto el origen como el destino son argumentos ``. +- `-t, --type ` - disambiguate when the source path matches multiple object kinds (e.g., a column and a hierarchy with the same name). +- `--save` / `--save-to ` - persist the change. +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). +- `--force` - save even if the mutation introduces DAX validation errors. ```bash -te mv Sales/Revenue Finance/Revenue --save # Move measure to another table -te mv Sales/Revenue Sales/TotalRevenue --save # Rename measure +te move Sales/Revenue Finance/Revenue --save # Move measure to another table +te move Sales/Revenue Sales/TotalRevenue --save # Rename measure +te move Sales/Date Sales/CalendarDate -t Hierarchy --save # Disambiguate hierarchy from column ``` ### replace @@ -284,7 +314,7 @@ Busca y reemplaza texto en los objetos del modelo. Simulación de forma predeter - `--dry-run` - previsualiza los cambios sin aplicarlos. Comportamiento predeterminado. - `--save` - guarda la modificación en la ubicación de origen. Incompatible con `--revert` y `--stage`. - `--save-to ` - guarda en una ruta diferente (implica `--save`). -- `--serialization ` - serialización del modelo: `tmdl`, `bim`, `te-folder`. +- `--serialization ` - model serialization: `tmdl`, `bim` (alias `tmsl`), `database.json`. - `--force` - guarda incluso si la sustitución introduce errores de validación de DAX. `--in expressions` recorre todas las propiedades que contienen expresiones: @@ -305,31 +335,31 @@ te replace "SUM" "SUMX" --regex --in expressions --save ## Inspección -### ls +### list -Enumera objetos con una navegación similar a la del sistema de archivos. Acepta un argumento `` que admite comodines. Tanto los contenedores de nivel de modelo (`Tables`, `Measures`, `Columns`, `Hierarchies`, `Relationships`, `Roles`, `Perspectives`, `Cultures`) como los contenedores con ámbito de tabla (`Sales/Measures`, `Sales/Columns`, …) se admiten. +Enumera objetos con una navegación similar a la del sistema de archivos. Acepta un argumento `` que admite comodines. Both model-level containers and table-scoped containers are supported - see the [container keyword table](#containers-and-keywords) above for the full list. (Alias: `ls`.) -`te ls` acepta: +`te list` accepts: - `--type ` - limita a un tipo de objeto (`table`, `measure`, `column`, `hierarchy`, `partition`, `relationship`, `role`, `perspective`, `culture`). Sin ``, esto equivale a escribir la palabra clave del contenedor correspondiente. - `--paths-only` - emite una ruta de objeto por línea, ideal para pasarlo a `xargs`, `te get` o `te set`. - `--no-multiline` - contrae las celdas multilínea (normalmente expresiones DAX o M) a una sola línea y las trunca para que las filas sigan siendo fáciles de recorrer en tablas anchas. Solo afecta a la salida de texto; la salida JSON/CSV/TMSL no se ve afectada. -- `--output-format tmsl` (alias `bim`) - genera los objetos coincidentes como un script TMSL/BIM. Útil para `te ls Tables --output-format bim > tables.json`. `--output-format tmdl` no es compatible con `ls` (TMDL solo admite un único objeto; usa `te get`). +- `--output-format tmsl` (alias `bim`) - genera los objetos coincidentes como un script TMSL/BIM. Useful for `te list Tables --output-format bim > tables.json`. `--output-format tmdl` no es compatible con `ls` (TMDL solo admite un único objeto; usa `te get`). ```bash -te ls # All tables in the model -te ls Sales # All children of Sales (columns + measures + hierarchies + partitions) -te ls Sales/Measures # Just Sales's measures -te ls 'Sales/*Amount' # Children of Sales whose name ends with Amount -te ls 'Sa*' # Tables whose name starts with Sa (no auto-expansion) -te ls '*/Amount' # An Amount column/measure across every table -te ls 'Roles/Re*/Members' # Members of every role matching Re* -te ls Sales/Geography/Levels # All levels of the Geography hierarchy -te ls "'Net Sales'/'Sales Amount'" # Quote names containing spaces -te ls Measures --paths-only # One Table/Measure per line for piping -te ls --type measure # Same as `te ls Measures` -te ls Measures --no-multiline # Wide table with column dividers, single-line DAX -te ls Tables --output-format bim > tables.json # All tables emitted as TMSL/BIM +te list # All tables in the model +te list Sales # All children of Sales (columns + measures + hierarchies + partitions) +te list Sales/Measures # Just Sales's measures +te list 'Sales/*Amount' # Children of Sales whose name ends with Amount +te list 'Sa*' # Tables whose name starts with Sa (no auto-expansion) +te list '*/Amount' # An Amount column/measure across every table +te list 'Roles/Re*/Members' # Members of every role matching Re* +te list Sales/Geography/Levels # All levels of the Geography hierarchy +te list "'Net Sales'/'Sales Amount'" # Quote names containing spaces +te list Measures --paths-only # One Table/Measure per line for piping +te list --type measure # Same as `te list Measures` +te list Measures --no-multiline # Wide table with column dividers, single-line DAX +te list Tables --output-format bim > tables.json # All tables emitted as TMSL/BIM ``` ### get @@ -343,7 +373,7 @@ Obtiene las propiedades de un objeto del modelo. Acepta un ``. - `--output-format tmsl` (alias `bim`) - genera el objeto resuelto como JSON TMSL/BIM. - `--output-format tmdl` - genera el objeto resuelto como TMDL (solo objetos con nombre). -`te get` y `te ls` comparten un único catálogo de descriptores, por lo que todas las propiedades aparecen igual en todos los formatos: la tabla de texto y las salidas JSON y CSV muestran el mismo conjunto, y al agregar una propiedad nueva al modelo queda expuesta en todas partes. +`te get` and `te list` share a single descriptor catalog, so every property surfaces the same way across formats - the text table, JSON, and CSV all see the same set, and adding a new property to the model exposes it everywhere. ```bash te get Sales/Amount -q expression # Print DAX @@ -381,6 +411,12 @@ Compara dos modelos para detectar diferencias estructurales. Devuelve los siguie ```bash te diff ./model-v1 ./model-v2 te diff old.bim new.bim + +# Branch on exit code (POSIX sh): +te diff ./a ./b; case $? in 0) echo same;; 1) echo different;; *) echo error;; esac + +# Branch on exit code (PowerShell): +te diff ./a ./b; switch ($LASTEXITCODE) { 0 { 'same' } 1 { 'different' } default { 'error' } } ``` ### deps @@ -393,7 +429,7 @@ Analiza las dependencias ascendentes y descendentes de un objeto, o detecta obje - `--downstream` - muestra solo las dependencias descendentes (los objetos que usan este objeto). - `--deep` - muestra el árbol de dependencias recursivo en lugar de solo las dependencias directas. - `--max-depth ` - profundidad máxima para el recorrido de `--deep` (predeterminado: `10`). -- `-t, --type ` - desambigua cuando la ruta coincide con varios elementos secundarios de una tabla (p. ej., una columna y una jerarquía con el mismo nombre). +- `-t, --type ` - disambiguate when the path matches multiple table-children (e.g., a column and a hierarchy with the same name). - `--unused` - enumera las medidas, las columnas calculadas y **todas las columnas de datos** a las que no hace referencia ninguna expresión DAX y que no se usan en ninguna relación, nivel de jerarquía, ordenación por columna, variación, base de AlternateOf ni rol de tiempo de calendario. Cada resultado muestra `(hidden)` en modo de texto y un campo `isHidden` en JSON. - `--hidden` - limita `--unused` a solo los objetos ocultos. Los objetos ocultos y sin usar son los candidatos más seguros para eliminar, porque ningún elemento visible para el usuario depende de ellos. @@ -427,6 +463,9 @@ te validate --ci github --trx results.trx te validate --errors-only # Hide warnings and anti-pattern hints ``` +> [!NOTE] +> `te validate` does not support `--output-format csv` - CSV is rejected up front with an actionable error rather than producing a partial result. Use `text` or `json` for validation output. + ### bpa run Ejecuta reglas de Best Practice Analyzer contra un modelo. @@ -445,8 +484,8 @@ Ejecuta reglas de Best Practice Analyzer contra un modelo. - `--fix` - aplicar expresiones de corrección para corregir automáticamente las infracciones cuando sea posible. - `--save` - volver a guardar el modelo en el origen después de aplicar las correcciones. - `--save-to ` - guardar el modelo en una ruta diferente después de aplicar las correcciones. -- `--serialization ` - serialización del modelo: `tmdl`, `bim`, `te-folder`. -- `--fail-on ` - umbral de fallo: `error` (predeterminado) o `warning`. Sale con el código `1` cuando las infracciones alcanzan el umbral. +- `--serialization ` - model serialization: `tmdl`, `bim` (alias `tmsl`), `database.json`. +- `--fail-on ` - umbral de fallo: `error` (predeterminado) o `warning`. Sale con el código `1` cuando las infracciones alcanzan el umbral. Rule-loading or evaluation errors (invalid expressions, unreadable rule files) also cause a non-zero exit regardless of `--fail-on`. - `--ci ` - emitir comandos de registro de CI a stderr: `vsts` (Azure DevOps), `github` (GitHub Actions). - `--trx ` - escribir los resultados como un archivo `.trx` de VSTEST en la PATH especificada. - `--no-multiline` - contraer el contenido de varias líneas de las celdas de la tabla de infracciones en una sola línea. Solo para la salida de texto. @@ -481,21 +520,21 @@ Rules loaded: 41 from 1 file(s) from bpa.rules config + built-in defaults + mode ### bpa rules -Administra colecciones de reglas de BPA: enumera, inspecciona, inicializa y activa o desactiva reglas en tu archivo local de reglas o en las anotaciones del modelo. Las reglas integradas son de solo lectura; para omitir una sin perder el resto, usa `te bpa rules disable` (no edites directamente el conjunto integrado). +Manage BPA rule collections - list, inspect, initialize, and toggle rules in your local rules file or in model annotations. Las reglas integradas son de solo lectura; para omitir una sin perder el resto, usa `te bpa rules disable` (no edites directamente el conjunto integrado). Subcomandos: -| Subcomando | Propósito | -| ------------------------------- | ------------------------------------------------------------------------------------------- | -| `add [model]` | Agrega una nueva regla de BPA. | -| [`disable`](#bpa-rules-disable) | Desactiva una regla de BPA integrada para el usuario actual. | -| [`enable`](#bpa-rules-enable) | Vuelve a activar una regla de BPA integrada que se había desactivado antes. | -| `ignore [model]` | Agrega una regla a la lista de ignorados del modelo. | -| [`init`](#bpa-rules-init) | Crea un archivo vacío de reglas de BPA en la ruta PATH resuelta. | -| [`list`](#bpa-rules-list) | Enumera las reglas de BPA de todos los orígenes con su estado. | -| `rm [model]` | Elimina una regla de BPA. | -| `set [model]` | Actualiza las propiedades de una regla del BPA. | -| `unignore [model]` | Elimina una regla de la lista de reglas ignoradas del modelo. | +| Subcomando | Propósito | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `add [model]` | Agrega una nueva regla de BPA. | +| [`disable`](#bpa-rules-disable) | Desactiva una regla de BPA integrada para el usuario actual. | +| [`enable`](#bpa-rules-enable) | Vuelve a activar una regla de BPA integrada que se había desactivado antes. | +| `ignore [model]` | Agrega una regla a la lista de ignorados del modelo. | +| [`init`](#bpa-rules-init) | Crea un archivo vacío de reglas de BPA en la ruta PATH resuelta. | +| [`list`](#bpa-rules-list) | Enumera las reglas de BPA de todos los orígenes con su estado. | +| `remove [model]` (alias `rm`) | Elimina una regla de BPA. | +| `set [model]` | Actualiza las propiedades de una regla del BPA. | +| `unignore [model]` | Elimina una regla de la lista de reglas ignoradas del modelo. | Todos los subcomandos de `te bpa rules` aceptan: @@ -503,7 +542,7 @@ Todos los subcomandos de `te bpa rules` aceptan: - `--model-rules`: opera sobre las reglas incrustadas en la anotación del modelo en lugar de un archivo. > [!IMPORTANT] -> `te bpa rules set` y `te bpa rules rm` se niegan a modificar los ID de reglas integradas. Si intentas hacerlo, el comando finaliza con el código `1` y te indica que uses `te bpa rules disable`. Para personalizar el comportamiento de una regla integrada, deshabilita la regla integrada y agrega una copia personalizada con un identificador distinto: +> `te bpa rules set` and `te bpa rules remove` refuse to mutate built-in rule IDs. Si intentas hacerlo, el comando finaliza con el código `1` y te indica que uses `te bpa rules disable`. Para personalizar el comportamiento de una regla integrada, deshabilita la regla integrada y agrega una copia personalizada con un identificador distinto: > > ```bash > te bpa rules disable TE3_BUILT_IN_DATE_TABLE_EXISTS @@ -532,7 +571,7 @@ Las reglas integradas deshabilitadas se marcan con un marcador `[disabled]` junt #### bpa rules init -Crea un archivo de reglas del BPA vacío (`[]`) en el PATH configurado. Úsalo una vez antes de ejecutar `te bpa rules set` / `te bpa rules rm` sobre una ruta que todavía no existe. +Crea un archivo de reglas del BPA vacío (`[]`) en el PATH configurado. Use this once before invoking `te bpa rules set` / `te bpa rules remove` against a path that does not yet exist. `te bpa rules init` acepta: @@ -547,11 +586,44 @@ te bpa rules init --rules-file ./MyRules.json te bpa rules init --force ``` +#### bpa rules add / set / remove / ignore / unignore + +Mutate the rules file (`add`, `set`, `remove` (alias `rm`)) or model-embedded ignore list (`ignore`, `unignore`). All three mutating subcommands operate on `--rules-file ` or `--model-rules` and refuse to touch built-in rule IDs. + +- `te bpa rules add ` - create a new rule. Pass each property as a named option: + - `--name ` - human-readable rule name (required). + - `--scope ` - comma-separated object kinds the rule applies to: `Measure`, `Column`, `Table`, `Hierarchy`, `Partition`, `Relationship`, `Role`, `Perspective`, `Culture`, etc. (required). + - `--expression ` - Dynamic LINQ predicate. Returns `true` for objects that violate the rule (required). + - `--category ` - grouping label (e.g. `Performance`, `Naming`, `DAX Expressions`). + - `--severity <1|2|3>` - `1` (info), `2` (warning, default), `3` (error). + - `--description ` - user-facing description shown when the rule fires. + - `--fix-expression ` - Dynamic LINQ expression used by `te bpa run --fix` to auto-remediate. +- `te bpa rules set ` - update properties on an existing rule. Uses `-q -i ` pairs (repeatable). Property names: `name`, `expression`, `scope`, `category`, `severity`, `description`, `fixExpression`. +- `te bpa rules remove ` - remove a rule. +- `te bpa rules ignore ` - add a rule ID to the model's `BestPracticeAnalyzer_IgnoreRules` annotation. +- `te bpa rules unignore ` - remove a rule ID from the model's ignore list. + +```bash +# Add a rule: measures that are not hidden and have no description +te bpa rules add MEASURE_NEEDS_DESCRIPTION \ + --name "Measures should have a description" \ + --scope Measure \ + --expression "not IsHidden and string.IsNullOrEmpty(Description)" \ + --severity 2 \ + --category Metadata + +# Update severity on an existing rule +te bpa rules set MEASURE_NEEDS_DESCRIPTION -q severity -i 3 + +# Remove the rule +te bpa rules remove MEASURE_NEEDS_DESCRIPTION +``` + #### bpa rules disable Deshabilita una regla BPA integrada específica. El identificador de la regla se agrega a `bpa.disabledBuiltInRuleIds` en la configuración de tu CLI. Las ejecuciones posteriores del gate (deploy, save, mutation) y `te bpa run` omiten la regla deshabilitada. -El comando es idempotente: ejecutar `disable` sobre una regla ya deshabilitada finaliza correctamente sin modificar la configuración. Finaliza con el código `1` si `` no es una regla BPA integrada; usa `te bpa rules list` para ver los identificadores válidos de reglas BPA integradas. +The command is idempotent - running `disable` against an already-disabled rule succeeds without modifying the config. Finaliza con el código `1` si `` no es una regla BPA integrada; usa `te bpa rules list` para ver los identificadores válidos de reglas BPA integradas. ```bash te bpa rules disable TE3_BUILT_IN_DATE_TABLE_EXISTS @@ -571,6 +643,7 @@ Analiza las estadísticas de almacenamiento de VertiPaq. `te vertipaq` acepta: +- `` - optional positional argument: a table name to filter the analysis to a single table. - `--columns`, `--relationships`, `--partitions`, `--all`. - `--detail` - muestra columnas expandidas (desglose del tamaño de datos/diccionario/jerarquía, codificación, segmentos). - `--fields ` - campos separados por comas para mostrar (p. ej., `--fields name,card,size,%tbl,%db,bar`). Los campos disponibles varían según la vista. @@ -578,10 +651,12 @@ Analiza las estadísticas de almacenamiento de VertiPaq. - `--import ` - carga un archivo `.vpax` exportado previamente y lo analiza sin conexión. - `--obfuscate` - ofusca nombres y expresiones en el VPAX exportado. - `--top `, `--stats`, `--annotate`, `--save`. +- `--auth ` - auth method override when connecting to a remote model. ```bash -te vertipaq # Columns by size (default) -te vertipaq --all # Tables, columns, relationships, partitions +te vertipaq # Columns by size (default) +te vertipaq Sales # Stats limited to the Sales table +te vertipaq --all # Tables, columns, relationships, partitions te vertipaq --export stats.vpax te vertipaq --import stats.vpax # Analyze offline ``` @@ -616,7 +691,8 @@ Ejecuta una consulta DAX contra un modelo implementado. `te query` admite: -- `-q, --query ` - consulta en línea. +- `` - positional argument: the DAX query to execute. Equivalent to passing `-q`. Use whichever shape reads better; explicit `-q` wins if both are supplied. +- `-q, --query ` - inline query (named-flag form of the positional above). - `--file ` - consulta desde un archivo. - `--limit ` - valor predeterminado: 100. - `-o, --output-file ` - escribe los resultados en un archivo (`.csv`, `.tsv`, `.json`, `.dax`). @@ -624,7 +700,8 @@ Ejecuta una consulta DAX contra un modelo implementado. - `--no-validate` - omite la validación semántica de DAX previa a la ejecución. ```bash -te query -q "EVALUATE TOPN(5, 'Sales')" -s my-ws -d my-model +te query "EVALUATE TOPN(5, 'Sales')" -s my-ws -d my-model # Positional DAX +te query -q "EVALUATE TOPN(5, 'Sales')" -s my-ws -d my-model # Named-flag form te query --file query.dax --output-format json ``` @@ -679,15 +756,29 @@ Administra y ejecuta macros desde un archivo JSON de macros (normalmente `MacroA Subcomandos: -| Subcomando | Propósito | -| -------------------------------- | --------------------------------------------------------------------- | -| `list` | Listar macros. | -| [`run `](#macro-run) | Ejecutar una macro. | -| `add ` | Agregar una macro. | -| `set ` | Actualizar las propiedades de la macro. | -| `rm ` | Eliminar una macro. | -| `sort` | Ordenar y reasignar los identificadores. | -| [`init`](#macro-init) | Crear un archivo de macros vacío en la ruta resuelta. | +| Subcomando | Propósito | +| ----------------------------------------------------- | --------------------------------------------------------------------- | +| `list` | Listar macros. | +| [`run `](#macro-run) | Ejecutar una macro. | +| `add ` | Agregar una macro. | +| `set ` | Actualizar las propiedades de la macro. | +| `remove ` (alias `rm`) | Eliminar una macro. | +| `sort` | Ordenar y reasignar los identificadores. | +| [`init`](#macro-init) | Crear un archivo de macros vacío en la ruta resuelta. | + +#### macro add / set / remove + +Mutate the macros file (`add`, `set`, `remove` (alias `rm`)). All three operate on `--macros ` (or the resolved macros file). + +- `te macro add ` - create a new macro. Provide the script body via `-e ""` (inline) or `-s ` (script file). Optional: `--tooltip `, `--contexts ` (where the macro applies, e.g., `Table,Measure`), `--enabled true|false`. +- `te macro set ` - update macro properties. Use `-q -i ` pairs (repeatable). Property names: `name`, `execute`, `enabled`, `tooltip`, `validContexts`. +- `te macro remove ` - remove a macro. + +```bash +te macro add MyMacro -e "Info(Selected.Measure.Name);" --tooltip "Print measure name" --contexts Measure +te macro set MyMacro -q tooltip -i "Updated tooltip" +te macro remove MyMacro +``` #### macro init @@ -742,7 +833,7 @@ Implementa un modelo semántico en Power BI, Fabric o Azure Analysis Services. - `--bpa-rules ` - se puede repetir; anula `bpa.rules` de la configuración de tu CLI solo para este despliegue. Las reglas integradas siguen aplicándose a menos que `bpa.builtInRules` sea `false`. - `--force` - omite la confirmación interactiva (necesario para CI). - `--ci ` - `vsts` o `github`. -- `--profile ` - uso puntual de un perfil de @te-cli-auth guardado. +- `-p, --profile ` - one-shot use of a saved @te-cli-auth profile. ```bash te deploy ./model -s my-workspace -d my-model --force --ci github @@ -753,18 +844,21 @@ te deploy ./model --profile staging --force > [!IMPORTANT] > `te deploy` ejecuta el Best Practice Analyzer como control previo antes de realizar el despliegue. En modo interactivo, se muestran un resumen y un mensaje de confirmación, con **`n` como opción segura predeterminada**. En CI, pasa `--force` para omitir la confirmación. Consulta @te-cli-config para la configuración del control de BPA. +> [!NOTE] +> When `--output-format json` is set, `te deploy`'s JSON payload always includes the resolved `server` and `database`, even when they were resolved from active connection or profile rather than passed explicitly. Pipelines can use these fields to confirm the deploy target without re-parsing the command line. `te deploy` and `te format` also exit non-zero on failure under `--output-format json`, matching their text-mode behavior - the JSON payload is the failure record, not a success signal. + ### refresh Inicia una actualización de datos en un modelo implementado. `te refresh` admite: -- `--type ` - `full`, `dataonly`, `automatic`, `calculate`, `clearvalues`, `defragment`, `add` (predeterminado: `automatic`). +- `--type ` - `full`, `dataonly` (alias `data-only`, `data`), `automatic` (alias `auto`), `calculate` (alias `calc`), `clearvalues` (alias `clear`), `defragment` (alias `defrag`), `add` (default: `automatic`). - `--table ` - actualiza tabla(s) específicas; se puede repetir. - `--partition ` - actualiza partición(es) específicas. - `--apply-refresh-policy` - aplica la política de actualización para determinar qué particiones se actualizan con la actualización incremental. - `--effective-date ` - establece la fecha efectiva que usa la política de actualización. -- `--max-parallelism ` - establece el número máximo de particiones que se pueden actualizar en paralelo. +- `--max-parallelism ` - establece el número máximo de particiones que se pueden actualizar en paralelo. Wraps the refresh in a TMSL `sequence` command. - `--dry-run` - muestra el script TMSL sin ejecutarlo. - `--no-progress`, `--trace [path]`. @@ -782,7 +876,7 @@ Gestiona las políticas de actualización para la actualización incremental de te incremental-refresh show ``` -Los subcomandos adicionales (`set`, `rm`, `apply`) están documentados en `te incremental-refresh --help`. +Additional subcommands (`set`, `remove` (alias `rm`), `apply`) are documented via `te incremental-refresh --help`. ## Pruebas @@ -819,12 +913,14 @@ te test init --from-model --model ./my-model # Generate stubs from your measure Establece (o muestra) la conexión activa para la sesión actual del terminal. Consulta @te-cli-auth. ```bash -te connect # Show current active connection -te connect my-workspace my-model # Remote -te connect ./model # Local -te connect --local # Power BI Desktop (Windows) -te connect --profile prod # Activate a saved profile -te connect --clear # Clear the active connection (and any workspace mirror) +te connect # Show current active connection +te connect my-workspace my-model # Remote (positional) +te connect -s my-workspace -d my-model # Remote (named-flag form) +te connect ./model # Local +te connect --local # Power BI Desktop (Windows) +te connect --local my-report # Filter by report name (multiple PBI Desktop instances) +te connect --profile prod # Activate a saved profile +te connect --clear # Clear the active connection (and any workspace mirror) ``` #### Modo del área de trabajo (`-w` / `--workspace`) @@ -833,11 +929,11 @@ Empareja un origen principal con un destino secundario para que cada `--save` po - `te connect -w ./src` - el origen principal es remoto; `./src` recibe una exportación inicial de TMDL y refleja cada guardado. - `te connect ./src -w ` - el origen principal es local; un despliegue inicial envía el modelo al Workspace, y los guardados posteriores lo vuelven a desplegar automáticamente. -- `--workspace-format ` - elige el formato en disco al sincronizarlo con una carpeta o archivo (por ejemplo, `-w ./model.bim` deduce BIM). +- `--workspace-format ` - choose the on-disk format when mirroring to a folder/file: `tmdl`, `bim` (alias `tmsl`), or `database.json`. When omitted, the format is inferred from the workspace target path (e.g., `-w ./model.bim` infers BIM). - `--workspace-auth ` - método de autenticación para un destino de Workspace remoto cuando el principal es local. Toma el valor de `--auth` si está establecido; de lo contrario, `auto`. - `--force`: obligatorio cuando el destino ya existe (carpeta no vacía o base de datos existente). Sin él, `te connect` muestra un prompt interactivo `y/n`, con `n` como opción segura predeterminada. -Una vez activado, `te set --save`, `te rm --save`, `te script --save`, etc. guardan de forma transparente en ambos destinos. El orden de guardado siempre es **primero local y después remoto**, para que la copia en disco refleje el último cambio del usuario aunque falle el envío al servidor. Borra la réplica con `te connect --clear`. +Once active, `te set --save`, `te remove --save`, `te script --save`, etc. all dual-save transparently. El orden de guardado siempre es **primero local y después remoto**, para que la copia en disco refleje el último cambio del usuario aunque falle el envío al servidor. Borra la réplica con `te connect --clear`. ```bash te connect Finance "Revenue Model" -w ./revenue-model # Mirror remote → local TMDL @@ -854,21 +950,17 @@ Administra perfiles de conexión con nombre. Consulta @te-cli-auth. ## Configuración -### config show / paths / init / set +### config list / paths / init / set -Consulta y administra la configuración de la CLI y las sobrescrituras de PATH de TE3. Consulta @te-cli-config. +Consulta y administra la configuración de la CLI y las sobrescrituras de PATH de TE3. (`te config list` alias: `ls`.) Consulta @te-cli-config. ```bash -te config show # Display all settings +te config list # Display all settings te config paths # Resolved TE3 file paths te config init # Create default config te config set autoFormat true ``` -### license - -`te license` está reservado para la versión GA y no está disponible en esta versión preliminar. El comando sigue integrado con el analizador, por lo que los scripts existentes que lo invocan no darán error durante el análisis, pero todos los subcomandos finalizan con el código de salida `1` y mensajes de "no está disponible en esta versión preliminar". Consulta el [aviso de versión preliminar](xref:te-cli#preview-notice) en la página de información general para conocer el panorama más amplio de licencias. - ### migrate Guía de referencia que muestra cómo las opciones heredadas de la CLI de Tabular Editor 2 se corresponden con la nueva CLI. Útil como referencia rápida mientras migras una canalización basada en TE2. Consulta @te-cli-migrate para ver la guía de migración completa. @@ -885,10 +977,19 @@ te migrate --output-format json # Machine-readable mapping Inicia una sesión REPL guiada con un prompt adaptado al modelo. Consulta @te-cli-interactive. +`te interactive` accepts: + +- `` - optional positional argument: start the session with a local model, `.bim` file, or `.SemanticModel` folder loaded. +- `--no-banner` - skip the welcome banner on startup. Useful when driving the REPL from scripts. +- `--echo` - echo each executed command to stdout before its output. Helpful when piping commands via stdin so the log shows what was run. +- `--batch` - non-interactive batch mode: read commands from stdin line by line, execute each, and exit on EOF. Automatically enabled when stdin is redirected. +- `--no-batch` - force interactive TTY mode even when stdin is redirected (mutually exclusive with `--batch`). + ```bash te interactive # Connect later te interactive ./model # Start with a local model te interactive -s MyWorkspace -d MyModel # Start with a remote model +printf "list Measures\nexit\n" | te interactive ./model # Pipe commands via stdin ``` Las comillas y las referencias de estilo DAX funcionan igual que fuera de la sesión - consulta la sección [Rutas de objetos](#object-paths) de arriba y @te-cli-interactive para más detalles sobre la división de argv con reconocimiento de corchetes dentro del REPL. @@ -932,11 +1033,11 @@ te completion fish ## Códigos de salida -| Código de salida | Significado | -| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `0` | Éxito. | -| `1` | Fallo genérico (argumentos no válidos, fallo del comando, errores de validación, fallo de autenticación, el BPA gate falló con una gravedad ≥ error). Para `te diff`: se encontraron diferencias. | -| `2` | Solo en `te diff`: se produjo un error durante la comparación, por lo que se desconoce el estado de las diferencias. | +| Código de salida | Significado | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `0` | Éxito. | +| `1` | Generic failure (invalid arguments, command failed, validation errors, auth failure, BPA gate failed at severity >= error). Para `te diff`: se encontraron diferencias. | +| `2` | Solo en `te diff`: se produjo un error durante la comparación, por lo que se desconoce el estado de las diferencias. | Para un control detallado en las canalizaciones de CI, combina los códigos de salida con las anotaciones `--ci ` y los archivos de resultados `--trx`; consulta @te-cli-cicd. From fd621df153f945e957c632ea63df7ccf612f00ce Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:04 +0200 Subject: [PATCH 23/49] New translations te-cli-config.md (Spanish) [ci skip] --- .../content/features/te-cli/te-cli-config.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-config.md b/localizedContent/es/content/features/te-cli/te-cli-config.md index ac979a97a..9a33b250f 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-config.md +++ b/localizedContent/es/content/features/te-cli/te-cli-config.md @@ -19,13 +19,13 @@ applies_to: La CLI de Tabular Editor lee una configuración opcional desde un archivo JSON. La configuración controla tres cosas: -- **PATH de archivos** — donde la CLI lee las macros, las reglas de BPA y (opcionalmente) el ejecutable de TE3 Desktop, y donde escribe el registro de consultas. -- **Valores predeterminados de comportamiento** — umbrales de BPA, formato automático y validación. -- **Perfiles de conexión guardados** — la lista de perfiles con nombre entre los que puedes alternar. +- **File paths** - where the CLI reads macros, BPA rules, and (optionally) the TE3 Desktop executable, and where to write the query log. +- **Behavioral defaults** - BPA gates, auto-format, validation. +- **Saved connection profiles** - the list of named profiles you can switch between. La CLI es independiente: no lee ni escribe en ningún PATH de instalación de la versión de escritorio de Tabular Editor 3. Los archivos de reglas de BPA y de macros deben definirse explícitamente en esta configuración (o inicializarse cuando haga falta con `te bpa rules init` / `te macro init`). -La mayoría de los usuarios no necesitan editar el archivo de configuración directamente: `te config show`, `te config set ` y `te profile set` cubren las operaciones habituales. +Most users don't need to edit the config file directly - `te config list`, `te config set `, and `te profile set` cover the common operations. ## Ubicación del archivo de configuración @@ -35,7 +35,7 @@ Se comprueban las siguientes ubicaciones en este orden: 2. `~/.config/te/config.json` (en Windows, `%USERPROFILE%\.config\te\config.json`). 3. Si no hay archivo de configuración, la CLI usa los valores predeterminados integrados. -`TE_CONFIG` se tiene en cuenta de forma coherente en todas las operaciones del archivo de configuración: `te config show`, `te config set`, `te config init` y `te config paths` leen y escriben en el PATH resuelto. Está pensado principalmente para pruebas, instalaciones mediante scripts y configuración por entorno. +`TE_CONFIG` is honored consistently by every config-file operation - `te config list`, `te config set`, `te config init`, and `te config paths` all read and write at the resolved path. Está pensado principalmente para pruebas, instalaciones mediante scripts y configuración por entorno. Para crear una configuración predeterminada: @@ -47,15 +47,15 @@ te config init --force # Overwrite existing config ## Ver la configuración ```bash -te config show # Display all settings -te config show --output-format json # Machine-readable +te config list # Display all settings +te config list --output-format json # Machine-readable te config paths # Show resolved macros and BPA rule paths ``` Usa `te config paths` para ver qué archivos usará realmente la CLI para las macros y las reglas de BPA. Es útil para depurar por qué faltan archivos de datos. La salida muestra dos filas: `macros` (la ruta del archivo de macros resuelta o `[not set]`) y `bpa.rules` (el primer archivo de reglas de BPA existente resuelto por el resolvedor de rutas, o `[not set]`). > [!NOTE] -> `te config paths` emite campos `null` explícitamente en el modo `--output-format json` (por ejemplo, `{"macros": null, "bpa": {"rules": null}}`). Informar de los resultados de la resolución es precisamente el propósito del comando, así que `null` es una respuesta significativa: «se intentó, pero no se resolvió nada». `te config show --output-format json` elimina los campos `null` de forma predeterminada, así que quienes lo consuman deberían parsearlo de forma tolerante. +> `te config paths` emite campos `null` explícitamente en el modo `--output-format json` (por ejemplo, `{"macros": null, "bpa": {"rules": null}}`). Informar de los resultados de la resolución es precisamente el propósito del comando, así que `null` es una respuesta significativa: «se intentó, pero no se resolvió nada». `te config list --output-format json` strips null fields by default, so consumers should parse it tolerantly. ## Configurar valores @@ -79,7 +79,7 @@ El esquema completo de configuración JSON con todas las claves en sus valores p ```json { - "formatVersion": 1, + "formatVersion": 2, "macros": null, "autoFormat": false, "validateOnMutation": true, @@ -144,10 +144,10 @@ Toda la configuración relacionada con BPA está en el objeto `bpa` y se referen | Clave | Predeterminado | Descripción | | ---------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `autoFormat` | `false` | Ejecuta DAX Formatter sobre las expresiones modificadas después de `te add` / `te set` / `te mv` / `te macro run`. Usa el formateador interno de forma predeterminada; puedes optar por el servicio web de SQL BI mediante `formatOptions.useSqlBiDaxFormatter`. | +| `autoFormat` | `false` | Run the DAX Formatter on modified expressions after `te add` / `te set` / `te move` / `te macro run`. Usa el formateador interno de forma predeterminada; puedes optar por el servicio web de SQL BI mediante `formatOptions.useSqlBiDaxFormatter`. | | `validateOnMutation` | `true` | Después de un comando de modificación (`add`, `set`, `mv`, `replace --save`, `macro run`), comprueba que todas las referencias `Table[Column]` del modelo se sigan resolviendo. Detecta referencias huérfanas introducidas por cambios de nombre o eliminaciones antes de llegar al despliegue. | | `bpa.onMutation` | `false` | Ejecuta un análisis de BPA acotado después de cada comando de modificación (`set`, `add`, `mv`, `rm`, `macro run`). Solo se comprueban los objetos de la tabla afectada, no los de todo el modelo; útil para obtener retroalimentación rápida durante ediciones iterativas. | -| `bpa.onDeploy` | `true` | Ejecuta el control de BPA antes de que se ejecute `te deploy`. El despliegue se cancela si alguna regla se activa con una severidad ≥ error. Omítelo en una invocación concreta con `--skip-bpa`, o corrígelo automáticamente con `--fix-bpa`. | +| `bpa.onDeploy` | `true` | Ejecuta el control de BPA antes de que se ejecute `te deploy`. The deploy is aborted if any rule fires at severity >= error. Omítelo en una invocación concreta con `--skip-bpa`, o corrígelo automáticamente con `--fix-bpa`. | | `bpa.onSave` | `true` | Ejecuta el control de BPA antes de que `te save -o` escriba en disco. Omítelo en una invocación concreta con `--skip-bpa` o `--force`. | | `bpa.builtInRules` | `true` | Incluye el conjunto depurado de reglas integradas de BPA cada vez que se ejecute el control. Configúralo en `false` para ignorar por completo las reglas integradas; entonces el control ejecutará solo las reglas configuradas mediante `bpa.rules` y cualquier regla incrustada en el modelo. | | `bpa.disabledBuiltInRuleIds` | `null` | ID de reglas integradas individuales que se excluirán de la puerta de calidad. Este valor se modifica mediante `te bpa rules disable ` / `te bpa rules enable `; es preferible usar esos comandos en lugar de editar el arreglo directamente. | @@ -200,11 +200,11 @@ El control BPA es la red de seguridad que impide que se guarde o se despliegue u - `te deploy` ejecuta el control, a menos que se pase `--skip-bpa` o que `bpa.onDeploy` sea `false`. - `te save` ejecuta el control, a menos que se pase `--skip-bpa` (o `--force`) o que `bpa.onSave` sea `false`. -- `te add`, `te set`, `te mv`, `te macro run` ejecutan el control solo cuando `bpa.onMutation` es `true`. +- `te add`, `te set`, `te move`, `te macro run` run the gate only when `bpa.onMutation` is `true`. El control carga las reglas de BPA desde `bpa.rules` y, de forma predeterminada, el conjunto de reglas integrado (controlado por `bpa.builtInRules`). Las reglas integradas pueden excluirse individualmente mediante `bpa.disabledBuiltInRuleIds`; se administran con `te bpa rules disable ` / `te bpa rules enable `. -Cuando el control se activa y encuentra infracciones con gravedad ≥ `error`, el comando falla con el código de salida `1` y un resumen de las infracciones. Opciones para resolverlo: +When the gate fires and finds violations at severity >= `error`, the command fails with exit code `1` and a summary of the violations. Opciones para resolverlo: - `--fix-bpa` - aplica en memoria la `fixExpression` de la regla al artefacto que se va a desplegar o guardar; los archivos fuente no se modifican. - `--skip-bpa` - desactiva el control solo para este comando. @@ -219,13 +219,13 @@ te bpa run ./model --fix --save # Apply fixes to the source ### Reglas de BPA integradas -La CLI incluye un único conjunto canónico de reglas de BPA integradas, incrustado como recurso JSON. Las reglas integradas son de solo lectura: `te bpa rules set` y `te bpa rules rm` se niegan a modificar los ID integrados y remiten a los usuarios a `te bpa rules disable` en su lugar. Para personalizar el comportamiento de una regla integrada, cópiala en tu archivo local de reglas como una regla nueva con un ID distinto y deshabilita la regla integrada. +La CLI incluye un único conjunto canónico de reglas de BPA integradas, incrustado como recurso JSON. Built-in rules are read-only - `te bpa rules set` and `te bpa rules remove` refuse to mutate built-in IDs and point users at `te bpa rules disable` instead. Para personalizar el comportamiento de una regla integrada, cópiala en tu archivo local de reglas como una regla nueva con un ID distinto y deshabilita la regla integrada. Tanto `bpa.builtInRules` como `bpa.disabledBuiltInRuleIds` se aplican de forma coherente a la validación de implementación/guardado/mutación **y** al comando manual `te bpa run`: si deshabilitas una regla una vez con `te bpa rules disable`, queda excluida en todas partes. ## Comportamiento tras la mutación -Cuando ejecutas un comando que modifica (`te add`, `te set`, `te mv`, `te replace --save`, `te macro run`), la CLI realiza estas comprobaciones automáticamente: +When you run a mutating command (`te add`, `te set`, `te move`, `te replace --save`, `te macro run`), the CLI performs these checks automatically: 1. **Los errores de TOM** siempre se muestran. Un DAX o M no válidos en medidas, columnas, particiones o elementos de cálculo siempre hacen que el comando falle. 2. **La validación del esquema** (`validateOnMutation`, valor predeterminado `true`) comprueba que las referencias `Table[Column]` en DAX sigan resolviéndose y verifica la consistencia de los metadatos. From 74d40899c6a59a3d7f2b2df067d4057e924cc4c8 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:06 +0200 Subject: [PATCH 24/49] New translations te-cli-limitations.md (Spanish) [ci skip] --- .../features/te-cli/te-cli-limitations.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-limitations.md b/localizedContent/es/content/features/te-cli/te-cli-limitations.md index d425a054d..ca9e41b72 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-limitations.md +++ b/localizedContent/es/content/features/te-cli/te-cli-limitations.md @@ -41,12 +41,12 @@ La CLI ejecuta C# Scripts (`te script`) sobre el mismo objeto `Model` que usas e ## Best Practice Analyzer -| Limitación | Notas / Solución alternativa | -| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Las fuentes de reglas de BPA deben ser URL HTTPS o rutas de archivos locales** | Solo se aceptan las URL `https://` y las rutas de archivo locales sin esquema. `http://` se reconoce, pero se rechaza deliberadamente en tiempo de carga con un error claro; como las reglas de BPA son expresiones de reglas ejecutables, obtenerlas a través de un canal no autenticado supondría un riesgo de manipulación. Otros esquemas de URL (`file://`, `ftp://`, …) no se admiten. Se aplica tanto a `te bpa run --rules` como a la lista de reglas configurada mediante [`te config set`](xref:te-cli-commands#config-show--paths--init--set). | -| **La validación de las URL de las reglas se realiza en el gate, no en `te config set`** | Un error tipográfico como `http://` lo acepta `te config set` y solo sale a la luz cuando BPA se ejecuta realmente. Después de editar las fuentes de reglas configuradas, ejecuta `te bpa run` (o `te validate`) una vez para comprobar que cada URL se carga correctamente. | -| **`--rules` no desactiva las reglas integradas** | Cuando se pasa `te bpa run --rules `, las reglas proporcionadas sustituyen las entradas de [`bpa.rules`](xref:te-cli-commands#config-show--paths--init--set) y `TE_BPA_RULES` para esa invocación, pero los valores predeterminados integrados siguen cargándose también. Para ejecutar solo el archivo de reglas explícito, pasa también `--no-defaults`. | -| **No hay ninguna opción por invocación para omitir la configuración de `bpa.rules`** | Una vez configurado `bpa.rules`, cada `te bpa run` carga esas reglas además de las integradas. Actualmente no hay ninguna opción para omitir los archivos de reglas configurados en una sola ejecución. Solución alternativa: pasa `--rules ` explícitamente; esta opción sustituye por completo `bpa.rules` y `TE_BPA_RULES` para esa invocación. | +| Limitación | Notas / Solución alternativa | +| --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Las fuentes de reglas de BPA deben ser URL HTTPS o rutas de archivos locales** | Solo se aceptan las URL `https://` y las rutas de archivo locales sin esquema. `http://` se reconoce, pero se rechaza deliberadamente en tiempo de carga con un error claro; como las reglas de BPA son expresiones de reglas ejecutables, obtenerlas a través de un canal no autenticado supondría un riesgo de manipulación. Otros esquemas de URL (`file://`, `ftp://`, …) no se admiten. Applies to both `te bpa run --rules` and the rule list configured via [`te config set`](xref:te-cli-commands#config-list--paths--init--set). | +| **La validación de las URL de las reglas se realiza en el gate, no en `te config set`** | Un error tipográfico como `http://` lo acepta `te config set` y solo sale a la luz cuando BPA se ejecuta realmente. Después de editar las fuentes de reglas configuradas, ejecuta `te bpa run` (o `te validate`) una vez para comprobar que cada URL se carga correctamente. | +| **`--rules` no desactiva las reglas integradas** | When `te bpa run --rules ` is passed, the supplied rules replace the entries in [`bpa.rules`](xref:te-cli-commands#config-list--paths--init--set) and `TE_BPA_RULES` for that invocation, but the built-in defaults still load alongside. Para ejecutar solo el archivo de reglas explícito, pasa también `--no-defaults`. | +| **No hay ninguna opción por invocación para omitir la configuración de `bpa.rules`** | Una vez configurado `bpa.rules`, cada `te bpa run` carga esas reglas además de las integradas. Actualmente no hay ninguna opción para omitir los archivos de reglas configurados en una sola ejecución. Solución alternativa: pasa `--rules ` explícitamente; esta opción sustituye por completo `bpa.rules` y `TE_BPA_RULES` para esa invocación. | ## Validación @@ -56,9 +56,9 @@ La CLI ejecuta C# Scripts (`te script`) sobre el mismo objeto `Model` que usas e ## E/S del modelo -| Limitación | Notas / Solución alternativa | -| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **`--serialization` no puede combinar una serialización con un contenedor PBIP** | La opción `--serialization` en [`te save`](xref:te-cli-commands#save) trata `bim`, `tmdl`, `te-folder` y `pbip` como mutuamente excluyentes, por lo que actualmente no se puede generar un contenedor PBIP alrededor de un modelo serializado con TMSL (`.bim`). Guarda TMDL dentro de un contenedor PBIP, o guarda `.bim` fuera de un contenedor PBIP. | +| Limitación | Notas / Solución alternativa | +| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **`--serialization` no puede combinar una serialización con un contenedor PBIP** | The `--serialization` option on [`te save`](xref:te-cli-commands#save) treats `bim`, `tmdl`, `database.json`, and `pbip` as mutually exclusive, so you cannot currently produce a PBIP container around a TMSL-serialized (`.bim`) model. Guarda TMDL dentro de un contenedor PBIP, o guarda `.bim` fuera de un contenedor PBIP. | ## Autenticación From 64167da30f50112482ff996b1954b4df1c419874 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:09 +0200 Subject: [PATCH 25/49] New translations te-cli-preview-notice.md (Spanish) [ci skip] --- .../content/features/te-cli/includes/te-cli-preview-notice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/es/content/features/te-cli/includes/te-cli-preview-notice.md b/localizedContent/es/content/features/te-cli/includes/te-cli-preview-notice.md index 7914d6072..e92f53863 100644 --- a/localizedContent/es/content/features/te-cli/includes/te-cli-preview-notice.md +++ b/localizedContent/es/content/features/te-cli/includes/te-cli-preview-notice.md @@ -1,2 +1,2 @@ > [!IMPORTANT] -> La CLI de Tabular Editor se encuentra en **vista previa pública limitada**. Se ofrece para su evaluación con una cuenta de Tabular Editor; no se requiere ninguna licencia durante la vista previa. Los comandos, las opciones y las salidas pueden cambiar antes de la disponibilidad general. **La versión preliminar deja de funcionar después de 2026-09-30.** No recomendamos usar la CLI en pipelines de CI/CD de producción durante la vista previa. Consulta nuestro acuerdo de licencia. +> La CLI de Tabular Editor se encuentra en **vista previa pública limitada**. Se ofrece para su evaluación con una cuenta de Tabular Editor; no se requiere ninguna licencia durante la vista previa. Los comandos, las opciones y las salidas pueden cambiar antes de la disponibilidad general. **La versión preliminar deja de funcionar después de 2026-09-30.** No recomendamos usar la CLI en pipelines de CI/CD de producción durante la vista previa. From 9d7635cf663fca95e298eec68d6a7d7a0e5afb2c Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:12 +0200 Subject: [PATCH 26/49] New translations te-cli-automation.md (Spanish) [ci skip] --- .../features/te-cli/te-cli-automation.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-automation.md b/localizedContent/es/content/features/te-cli/te-cli-automation.md index 35f9f7774..c13e27667 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-automation.md +++ b/localizedContent/es/content/features/te-cli/te-cli-automation.md @@ -28,11 +28,11 @@ Use `--output-format` para alternar cualquier comando entre el formato de texto | `text` (predeterminado) | Para uso humano | Texto sin formato en stdout, independientemente de si el flujo es un TTY o se canaliza. | | `json` | Para uso por máquina | Siempre devuelve JSON válido en stdout. Use `--error-format json` si también quiere errores legibles por máquina en stderr. | | `csv` | Resultados tabulares (`query`, `bpa run`, `bpa rules`, `vertipaq`, `validate`, `test`, `refresh`, `profile list`, `session list`, `find`, `replace`, `get`, `ls`) | Escapado según RFC 4180. | -| `tmsl` (alias `bim`) | Serialización TMSL/BIM del objeto completo | Aceptado por `te get` y `te ls`. | +| `tmsl` (alias `bim`) | Serialización TMSL/BIM del objeto completo | Accepted by `te get` and `te list`. | | `tmdl` | Serialización TMDL del objeto completo | Aceptado solo por `te get` (un solo objeto). | ```bash -te ls --output-format json +te list --output-format json te query -q "EVALUATE VALUES('Date'[Year])" --output-format csv te bpa run --output-format json ``` @@ -52,11 +52,11 @@ te deploy ./model --non-interactive --force --ci github Todos los comandos de `te` finalizan con un código de estado predecible, para que quien los invoque pueda tomar decisiones según el éxito o el error sin tener que analizar stdout. -| Código de salida | Significado | -| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `0` | Éxito. | -| `1` | Error genérico: argumentos inválidos, fallo del comando, errores de validación, error de autenticación, fallo en la comprobación de BPA con severidad ≥ error. En `te diff`: se encontraron diferencias (como en la convención `diff`/`cmp`). | -| `2` | Solo en `te diff`: se produjo un error durante la comparación, por lo que se desconoce el estado de las diferencias. | +| Código de salida | Significado | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `0` | Éxito. | +| `1` | Generic failure - invalid arguments, command failed, validation errors, auth failure, BPA gate failed at severity >= error. En `te diff`: se encontraron diferencias (como en la convención `diff`/`cmp`). | +| `2` | Solo en `te diff`: se produjo un error durante la comparación, por lo que se desconoce el estado de las diferencias. | Combina los códigos de salida con las anotaciones `--ci ` y `--trx ` para mostrar información detallada sobre los errores en CI; consulta @te-cli-cicd. @@ -65,7 +65,7 @@ Combina los códigos de salida con las anotaciones `--ci ` y `--tr Los errores, las advertencias y el banner de versión preliminar se escriben en **stderr**; los datos estructurados se escriben en **stdout**. Esto significa que puedes canalizar JSON de forma segura sin que se contamine con indicadores de progreso ni mensajes de diagnóstico: ```bash -te ls --output-format json | jq '.[] | .name' +te list --output-format json | jq '.[] | .name' te vertipaq --output-format json > stats.json ``` @@ -152,7 +152,7 @@ Compón comandos con pipes y `jq`. La salida de texto de la CLI está coloreada ```bash # Count measures per table -te ls --type measure --output-format json \ +te list --type measure --output-format json \ | jq -r '.[] | .table' \ | sort | uniq -c | sort -rn ``` @@ -179,10 +179,10 @@ El TMSL resultante puede revisarse en un pull request, confirmarse mediante un c Algunos patrones pequeños que aparecen a menudo al componer comandos de `te` en scripts o pipelines: -- **Creaciones y eliminaciones idempotentes de medidas.** `te add Sales/Marker -t Measure -i "0" --if-not-exists --save` y `te rm Sales/OldMeasure --if-exists --save` salen con código `0` exista o no el objeto; es seguro volver a ejecutarlos en CI. +- **Idempotent creates and removes.** `te add Sales/Marker -t Measure -i "0" --if-not-exists --save` and `te remove Sales/OldMeasure --if-exists --save` both exit `0` whether or not the object existed - safe to re-run in CI. - **Diferencias en modo de prueba.** `te replace` funciona en modo de prueba de forma predeterminada; añade `--save` solo cuando estés conforme con la vista previa. - **Genera TMSL para revisión.** `te deploy ./model --xmla deploy.tmsl` produce el script de implementación sin tocar el servidor; útil para que lo revise un DBA o para aplicarlo manualmente. -- **Salida solo con rutas.** `te ls --paths-only` y `te find --paths-only` emiten una ruta de objeto por línea, ideal para canalizarlo a `xargs`, `te get` o `te set`. Los contenedores a nivel de modelo para medidas (`te ls Measures`, `te ls Columns`) se combinan bien con esto para recorridos completos del modelo. +- **Path-only output.** `te list --paths-only` and `te find --paths-only` emit one object path per line, ideal for piping to `xargs`, `te get`, or `te set`. The model-level containers (`te list Measures`, `te list Columns`) compose well with this for whole-model sweeps. - **Pruebas de rendimiento de consultas.** `te query --trace --cold --runs 5` ejecuta una consulta DAX con caché en frío, cinco iteraciones y captura eventos de traza de FE/SE. - **Tiempos por paso en los logs de CI.** Los comandos de larga duración (`te deploy`, `te refresh`, `te script`, `te validate`) incluyen un campo `durationMs` en la salida JSON; útil para mostrar los tiempos de cada paso en los resúmenes del pipeline. From bbed7cea2c88cc3cf97cf02e6e2a3aa0b5282b28 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:14 +0200 Subject: [PATCH 27/49] New translations te-cli-cicd.md (Spanish) [ci skip] --- localizedContent/es/content/features/te-cli/te-cli-cicd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-cicd.md b/localizedContent/es/content/features/te-cli/te-cli-cicd.md index f54a82dee..bcf2e935f 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-cicd.md +++ b/localizedContent/es/content/features/te-cli/te-cli-cicd.md @@ -167,7 +167,7 @@ steps: `te deploy` y `te save` ejecutan el Best Practice Analyzer como compuerta de verificación previa de forma predeterminada. Hay tres comportamientos que conviene definir de antemano: -- **Aplicar**: el valor predeterminado. El pipeline falla si el BPA encuentra infracciones con severidad ≥ error. Combínalo con `--fail-on warning` en un paso independiente de `te bpa run` si quieres que las advertencias también hagan fallar el pipeline. +- **Aplicar**: el valor predeterminado. Pipeline fails if BPA finds violations at severity >= error. Combínalo con `--fail-on warning` en un paso independiente de `te bpa run` si quieres que las advertencias también hagan fallar el pipeline. - **Corrección automática**: `--fix-bpa` aplica las `fixExpression`s en memoria al artefacto desplegado. Los archivos de origen no se modifican. Es útil cuando la fuente de verdad está en el modelo y quieres que los despliegues normalicen el estilo sin intervención del desarrollador. - **Omitir**: `--skip-bpa` desactiva el control para un solo comando. Útil para correcciones urgentes de emergencia; no se recomienda como valor predeterminado. From 2f85b08122b3a1cef572b6ae550c3a1f0c13c5e3 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:17 +0200 Subject: [PATCH 28/49] New translations te-cli-install.md (Spanish) [ci skip] --- localizedContent/es/content/features/te-cli/te-cli-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-install.md b/localizedContent/es/content/features/te-cli/te-cli-install.md index 8f97d2647..c79ff491a 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-install.md +++ b/localizedContent/es/content/features/te-cli/te-cli-install.md @@ -132,7 +132,7 @@ te config set hidePreviewNotice true ## Autocompletado del shell -La CLI proporciona scripts de autocompletado para **Bash**, **Zsh**, **PowerShell** y **Fish**. Elige el bloque que corresponda a tu shell: cada uno instala el autocompletado de forma persistente para las nuevas sesiones de shell. +La CLI proporciona scripts de autocompletado para **Bash**, **Zsh**, **PowerShell** y **Fish**. Pick the block that matches your shell - each one installs the completion persistently for new shell sessions. ### Bash (macOS/Linux) From fed03f6b4f056249482e5d88f1b95503f3599e62 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:20 +0200 Subject: [PATCH 29/49] New translations te-cli-interactive.md (Spanish) [ci skip] --- .../features/te-cli/te-cli-interactive.md | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-interactive.md b/localizedContent/es/content/features/te-cli/te-cli-interactive.md index 98f169e6c..d4477f96c 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-interactive.md +++ b/localizedContent/es/content/features/te-cli/te-cli-interactive.md @@ -2,7 +2,7 @@ uid: te-cli-interactive title: Modo interactivo author: Peer Grønnerup -updated: 2026-05-12 +updated: 2026-06-26 applies_to: products: - product: Tabular Editor 2 @@ -29,6 +29,13 @@ te interactive ./model # Start with a local model te interactive -s MyWorkspace -d MyModel # Start with a remote model ``` +`te interactive` accepts a few flags for tuning the session: + +- `--no-banner` - skip the welcome banner on startup. +- `--echo` - echo each executed command to stdout before its output. Useful for logging when driving the REPL from a script. +- `--batch` - non-interactive batch mode: read commands from stdin line by line, execute each, and exit on EOF. Automatically enabled when stdin is redirected. +- `--no-batch` - force interactive TTY mode even when stdin is redirected (mutually exclusive with `--batch`). + La sesión imprime un banner de bienvenida, muestra el modelo activo y te sitúa en un prompt con contexto del modelo: ![Sesión del modo interactivo de Tabular Editor CLI](~/content/assets/images/features/cli/cli-interactive-mode.png) @@ -84,6 +91,64 @@ Cuando el modo interactivo está activo, los comandos que necesitan información Para desactivar las indicaciones en un único comando dentro de la sesión, pasa `--non-interactive`. +## Piped and redirected input + +Interactive mode also accepts piped or redirected stdin, so the same REPL can be driven from a script instead of typed by hand. Each line of input is run as a command, exactly as if you had entered it at the prompt, and the session exits when input is exhausted (or when it reaches an `exit` line). + +```bash +printf "ls\nexit\n" | te interactive ./model # bash / git-bash +te interactive ./model < script.te # redirected file +``` + +```bat +(echo ls & echo exit) | te interactive .\model :: Windows cmd.exe +``` + +Lines that start with `#` are treated as comments and skipped, so you can annotate a script file: + +``` +# script.te - inspect the model, then exit +ls tables +ls measures +exit +``` + +### Batch mode and exit codes + +When stdin is piped, `--batch` is the **default**: the session stops at the first command that fails and exits with a non-zero code, which makes a piped run safe to use as a build or CI step. Pass `--no-batch` to keep running the remaining lines even after a command fails. The process exit code is `0` for a clean run and non-zero when a command fails under batch mode. + +```bash +# Default when piped: stop at the first failing command, exit non-zero +printf "bpa run --fail-on error\ndeploy --force\nexit\n" | te interactive ./model + +# Run every line regardless of failures +printf "bpa run --fail-on error\ndeploy --force\nexit\n" | te interactive ./model --no-batch +``` + +### Readable transcripts + +`--echo` writes each input line to stdout ahead of its output, which is handy when capturing a transcript of a piped run. Comment lines are not echoed. + +```bash +printf "ls tables\nexit\n" | te interactive ./model --echo +``` + +### Opciones + +| Opción | Descripción | +| ------------- | ------------------------------------------------------------------------------------------------------------ | +| `--no-banner` | Suppress the welcome banner. | +| `--echo` | Echo each input line to stdout (useful for piped transcripts). | +| `--batch` | Exit non-zero on the first failing command (default when stdin is piped). | +| `--no-batch` | Continue after errors even when stdin is piped. | + +### Welcome banner vs. preview notice + +Two separate messages can appear at the start of a session - don't conflate them: + +- The **welcome banner** is the interactive splash described under [Starting a session](#starting-a-session). It is suppressed with `--no-banner`. When stdin is piped, no welcome banner is emitted in the first place, so `--no-banner` has a visible effect only in a true interactive (TTY) session. +- The **preview-expiry notice** (`This is an early preview release ...`) is a different message. It is always written to **stderr** and is **not** affected by `--no-banner`. Suppress it with `te config set hidePreviewNotice true`. + ## Cuándo usar el modo interactivo frente al no interactivo - **El modo interactivo** es ideal para explorar, aprender la CLI, hacer ediciones masivas puntuales sobre un único modelo y realizar demos. From 9394c9e42ac7a68500778c1b08eb3deadac9562f Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:23 +0200 Subject: [PATCH 30/49] New translations te-cli-migrate.md (Spanish) [ci skip] --- .../content/features/te-cli/te-cli-migrate.md | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-migrate.md b/localizedContent/es/content/features/te-cli/te-cli-migrate.md index f6ff7920a..9bd60bd08 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-migrate.md +++ b/localizedContent/es/content/features/te-cli/te-cli-migrate.md @@ -55,34 +55,34 @@ Consulta la salida del comando `te migrate` para ver el mapeo actual, que reflej Un resumen no exhaustivo de los flags más usados. Ejecuta `te migrate` para ver la lista completa. -| Flag de TE2 | Nuevo equivalente en la CLI | Notas | -| ------------------------------------------------------------------ | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `file` (posicional) | `te ` o el flag global `--model` | Primer argumento posicional en la mayoría de los comandos. | -| `server`, `database` | `te connect ` o `te deploy ` | El servidor ya no es un argumento posicional global. | -| `-L` / `-LOCAL` | `te connect --local` | Solo para Windows. | -| `-S` / `-SCRIPT` | `te script -S ` o `-e "code"` | Admite varios scripts, código en línea y stdin. Nota: `-S` en mayúsculas; `-s` en minúsculas corresponde a la opción global `--server`. | -| `-A` / `-ANALYZE` | `te bpa run --rules ` | Admite `--fail-on`, `--fix` y varios archivos de reglas. | -| `-AX` / `-ANALYZEX` | `te bpa run --rules ` (sin `--model-rules`) | Excluir las reglas incrustadas en el modelo es ahora el comportamiento predeterminado. | -| `-B` / `-BIM` | `te save -o --serialization bim` | | -| `-F` / `-FOLDER` | `te save -o --serialization te-folder` | Tras `-D`, el `-F` de TE2 significa `-FULL`. Consulta `--deploy-full`. | -| `-TMDL` | `te save -o --serialization tmdl` | TMDL es el formato de guardado predeterminado. | -| `-D` / `-DEPLOY` | `te deploy ` | Comando independiente con opciones con nombre. | -| `-O` / `-OVERWRITE` | (predeterminado) o `--create-only` para no aplicarlo | La sobrescritura es el comportamiento predeterminado en la nueva CLI. | -| `-C` / `-CONNECTIONS` | `te deploy --deploy-connections` | | -| `-P` / `-PARTITIONS` | `te deploy --deploy-partitions` | | -| `-Y` / `-SKIPPOLICY` | `te deploy --deploy-partitions --skip-refresh-policy` | Requiere `--deploy-partitions`. | -| `-SHARED` | `te deploy --deploy-shared-expressions` | Después de `-D`, `-S` en TE2 significa `-SHARED`. | -| `-R` / `-ROLES` | `te deploy --deploy-roles` | | -| `-M` / `-MEMBERS` | `te deploy --deploy-role-members` | | -| `-FULL` (después de `-D`) | `te deploy --deploy-full` | Equivale a: sobrescritura + conexiones + particiones + elementos compartidos + roles + miembros de rol. | -| `-X` / `-XMLA ` | `te deploy ... --xmla ` | Usa `-` para stdout. | -| `-V` / `-VSTS` | `--ci vsts` en `validate`, `bpa run`, `deploy` | Emite anotaciones `##vso[...]` en stderr. | -| `-G` / `-GITHUB` | `--ci github` | Emite anotaciones `::error::` / `::warning::`. | -| `-T` / `-TRX ` | `--trx ` en `validate`, `bpa run`, `test run` | Archivo `.trx` de VSTEST para publicar pruebas en Azure DevOps. | -| `-W` / `-WARN` | (predeterminado) | Las advertencias siempre se incluyen en el Report de resultados de la implementación. | -| `-E` / `-ERR` | (predeterminado) | La implementación devuelve un código de salida distinto de cero cuando hay errores de DAX. | -| `-SC` / `-SCHEMACHECK` | _Aún no se ha implementado._ | La comprobación del esquema de TE2 se conecta a los Data source reales. A diferencia de `te validate` (validación semántica de DAX, sin conexión al Data source). | -| `-L` / `-LOGIN ` (después de `-D`) | `te auth login -u -p -t ` | Usa una entidad de servicio o credenciales basadas en variables de entorno. El inicio de sesión se guarda en caché, así que los comandos posteriores obtienen tokens de forma silenciosa; consulta @te-cli-auth. | +| Flag de TE2 | Nuevo equivalente en la CLI | Notas | +| ------------------------------------------------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` (posicional) | `te ` o el flag global `--model` | Primer argumento posicional en la mayoría de los comandos. | +| `server`, `database` | `te connect ` or `te deploy -s -d ` | Server is no longer a global positional; `te deploy` takes only `` positionally, with server and database as named flags. | +| `-L` / `-LOCAL` | `te connect --local` | Solo para Windows. | +| `-S` / `-SCRIPT` | `te script -S ` o `-e "code"` | Admite varios scripts, código en línea y stdin. Nota: `-S` en mayúsculas; `-s` en minúsculas corresponde a la opción global `--server`. | +| `-A` / `-ANALYZE` | `te bpa run --rules ` | Admite `--fail-on`, `--fix` y varios archivos de reglas. | +| `-AX` / `-ANALYZEX` | `te bpa run --rules ` (sin `--model-rules`) | Excluir las reglas incrustadas en el modelo es ahora el comportamiento predeterminado. | +| `-B` / `-BIM` | `te save -o --serialization bim` | | +| `-F` / `-FOLDER` | `te save -o --serialization database.json` | Tras `-D`, el `-F` de TE2 significa `-FULL`. Consulta `--deploy-full`. | +| `-TMDL` | `te save -o --serialization tmdl` | TMDL es el formato de guardado predeterminado. | +| `-D` / `-DEPLOY` | `te deploy -s -d ` | Separate command with named options; only `` is positional. | +| `-O` / `-OVERWRITE` | (predeterminado) o `--create-only` para no aplicarlo | La sobrescritura es el comportamiento predeterminado en la nueva CLI. | +| `-C` / `-CONNECTIONS` | `te deploy --deploy-connections` | | +| `-P` / `-PARTITIONS` | `te deploy --deploy-partitions` | | +| `-Y` / `-SKIPPOLICY` | `te deploy --deploy-partitions --skip-refresh-policy` | Requiere `--deploy-partitions`. | +| `-SHARED` | `te deploy --deploy-shared-expressions` | Después de `-D`, `-S` en TE2 significa `-SHARED`. | +| `-R` / `-ROLES` | `te deploy --deploy-roles` | | +| `-M` / `-MEMBERS` | `te deploy --deploy-role-members` | | +| `-FULL` (después de `-D`) | `te deploy --deploy-full` | Equivale a: sobrescritura + conexiones + particiones + elementos compartidos + roles + miembros de rol. | +| `-X` / `-XMLA ` | `te deploy ... --xmla ` | Usa `-` para stdout. | +| `-V` / `-VSTS` | `--ci vsts` en `validate`, `bpa run`, `deploy` | Emite anotaciones `##vso[...]` en stderr. | +| `-G` / `-GITHUB` | `--ci github` | Emite anotaciones `::error::` / `::warning::`. | +| `-T` / `-TRX ` | `--trx ` en `validate`, `bpa run`, `test run` | Archivo `.trx` de VSTEST para publicar pruebas en Azure DevOps. | +| `-W` / `-WARN` | (predeterminado) | Las advertencias siempre se incluyen en el Report de resultados de la implementación. | +| `-E` / `-ERR` | (predeterminado) | La implementación devuelve un código de salida distinto de cero cuando hay errores de DAX. | +| `-SC` / `-SCHEMACHECK` | _Aún no se ha implementado._ | La comprobación del esquema de TE2 se conecta a los Data source reales. A diferencia de `te validate` (validación semántica de DAX, sin conexión al Data source). | +| `-L` / `-LOGIN ` (después de `-D`) | `te auth login -u -p -t ` | Usa una entidad de servicio o credenciales basadas en variables de entorno. El inicio de sesión se guarda en caché, así que los comandos posteriores obtienen tokens de forma silenciosa; consulta @te-cli-auth. | ## Guía de migración From bc19a3f451eadc72ec7bae86bd293ff87a97ebd5 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:25 +0200 Subject: [PATCH 31/49] New translations te-cli.md (Spanish) [ci skip] --- .../es/content/features/te-cli/te-cli.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli.md b/localizedContent/es/content/features/te-cli/te-cli.md index 2a20f42dc..fbb4f0910 100644 --- a/localizedContent/es/content/features/te-cli/te-cli.md +++ b/localizedContent/es/content/features/te-cli/te-cli.md @@ -27,9 +27,9 @@ A diferencia de las opciones de línea de comandos de `TabularEditor.exe` exclus Tres pilares de diseño están presentes en todos los comandos: -- **Salida estructurada** — JSON, CSV, TMDL y TMSL, además del texto legible predeterminado. -- **Modo no interactivo** — una opción global `--non-interactive` que desactiva las indicaciones y falla de inmediato. -- **Errores claros** — se escriben en stderr con códigos de salida predecibles. +- **Structured output** - JSON, CSV, TMDL, TMSL alongside default human-readable text. +- **Non-interactive mode** - a global `--non-interactive` flag that disables prompts and fails fast. +- **Clear errors** - written to stderr with predictable exit codes. En conjunto, hacen que el mismo binario funcione bien para tres perfiles muy distintos: @@ -49,14 +49,14 @@ Consulta @te-cli-commands para ver una referencia completa de los comandos, con | Familia | Qué hace | Comandos de ejemplo | | ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [E/S del modelo](xref:te-cli-commands#model-io) | Cargar, guardar, convertir e inicializar modelos | [`te load`](xref:te-cli-commands#load), [`te save`](xref:te-cli-commands#save), [`te init`](xref:te-cli-commands#init) | -| [Edición del modelo](xref:te-cli-commands#model-editing) | Obtener y establecer propiedades; añadir, quitar y mover objetos | [`te set`](xref:te-cli-commands#set), [`te add`](xref:te-cli-commands#add), [`te rm`](xref:te-cli-commands#rm), [`te mv`](xref:te-cli-commands#mv) | -| [Inspección](xref:te-cli-commands#inspection) | Listar objetos, buscar, comparar y analizar dependencias | [`te ls`](xref:te-cli-commands#ls), [`te find`](xref:te-cli-commands#find), [`te diff`](xref:te-cli-commands#diff), [`te deps`](xref:te-cli-commands#deps) | +| [Edición del modelo](xref:te-cli-commands#model-editing) | Obtener y establecer propiedades; añadir, quitar y mover objetos | [`te set`](xref:te-cli-commands#set), [`te add`](xref:te-cli-commands#add), [`te remove`](xref:te-cli-commands#remove), [`te move`](xref:te-cli-commands#move) | +| [Inspección](xref:te-cli-commands#inspection) | Listar objetos, buscar, comparar y analizar dependencias | [`te list`](xref:te-cli-commands#list), [`te find`](xref:te-cli-commands#find), [`te diff`](xref:te-cli-commands#diff), [`te deps`](xref:te-cli-commands#deps) | | [Análisis y calidad](xref:te-cli-commands#analysis-and-quality) | Validar, ejecutar BPA, dar formato a DAX y analizar el almacenamiento | [`te validate`](xref:te-cli-commands#validate), [`te bpa run`](xref:te-cli-commands#bpa-run), [`te format`](xref:te-cli-commands#format), [`te vertipaq`](xref:te-cli-commands#vertipaq) | | [Ejecución](xref:te-cli-commands#execution) | Ejecutar consultas DAX, C# Scripts y macros | [`te query`](xref:te-cli-commands#query), [`te script`](xref:te-cli-commands#script), [`te macro`](xref:te-cli-commands#macro) | | [Implementación y actualización](xref:te-cli-commands#deployment-and-refresh) | Implementar en el Workspace, iniciar una actualización y realizar una actualización incremental | [`te deploy`](xref:te-cli-commands#deploy), [`te refresh`](xref:te-cli-commands#refresh), [`te incremental-refresh`](xref:te-cli-commands#incremental-refresh) | | [Pruebas](xref:te-cli-commands#testing) | Pruebas de aserciones, instantáneas, comparación A/B | [`te test run`](xref:te-cli-commands#test-run) | | [Conexión y autenticación](xref:te-cli-commands#connection-and-authentication) | Conéctate a los Workspace y gestiona la autenticación y los perfiles | [`te connect`](xref:te-cli-commands#connect), [`te auth`](xref:te-cli-commands#auth-login--status--logout), [`te profile`](xref:te-cli-commands#profile-list--show--set--remove) | -| [Configuración](xref:te-cli-commands#configuration) | Configuración y licencias | [`te config`](xref:te-cli-commands#config-show--paths--init--set) | +| [Configuración](xref:te-cli-commands#configuration) | Configuración y licencias | [`te config`](xref:te-cli-commands#config-list--paths--init--set) | | [Shell](xref:te-cli-commands#shell) | Modo interactivo, estado de la sesión, completado automático del shell | [`te interactive`](xref:te-cli-commands#interactive), [`te session`](xref:te-cli-commands#session), [`te completion`](xref:te-cli-commands#completion) | ## Primeros pasos @@ -70,10 +70,10 @@ Para ver por primera vez un modelo en vivo, solo necesitas dos comandos: ```bash te auth login -te ls -s MyWorkspace -d MyModel +te list -s MyWorkspace -d MyModel ``` -![Salida de ejemplo de te ls en la CLI de Tabular Editor](~/content/assets/images/features/cli/cli-command-ls.png) +![Tabular Editor CLI te list example output](~/content/assets/images/features/cli/cli-command-ls.png) ## Aviso de versión preliminar From 167bb3b9aa91b93b6390dfa00254aa9c3e2f2e9d Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:29 +0200 Subject: [PATCH 32/49] New translations te-cli-commands.md (Chinese Simplified) [ci skip] --- .../features/te-cli/te-cli-commands.md | 345 +++++++++++------- 1 file changed, 223 insertions(+), 122 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-commands.md b/localizedContent/zh/content/features/te-cli/te-cli-commands.md index 38270a6fc..3c3b85e90 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-commands.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-commands.md @@ -31,8 +31,8 @@ te bpa run --help # Help for a command with subcommands CLI 中的对象定位在所有命令中都采用同一套语法。 以下参考中会出现两种路径形式: -- **``** - 解析为**恰好一个**对象或容器。 用于对单个目标执行操作的命令:`te get`、`te set`、`te add`、`te rm`、`te mv`、`te format -p`、`te deps`、`te macro run --on`。 -- **``** - 解析为**零个或多个**对象,并支持通配符。 用于对一组对象执行操作的命令:`te ls`、`te bpa run --path` 以及其他用于检查的命令。 +- **``** - 解析为**恰好一个**对象或容器。 Used by commands that operate on a single target: `te get`, `te set`, `te add`, `te remove`, `te move`, `te format -p`, `te deps`, `te macro run --on`. +- **``** - 解析为**零个或多个**对象,并支持通配符。 Used by commands that operate on a set: `te list`, `te bpa run --path`, and other inspection-style commands. 两种路径形式共用同一套语法规则;仅有两处不同: @@ -43,9 +43,9 @@ CLI 中的对象定位在所有命令中都采用同一套语法。 以下参考 路径是由斜杠分隔的 **分段** 序列。 每个分段表示一个步骤:一个表、一个子对象,或一个容器关键字。 -- `Sales` — 一个分段 -- `Sales/Revenue` — 两个分段 -- `Roles/Admin/Members/bob` — 四个分段 +- `Sales` - one segment +- `Sales/Revenue` - two segments +- `Roles/Admin/Members/bob` - four segments 空输入和 `.` 都表示“模型根”——它既是筛选路径的隐式起点,也是 `te get .` 这类查询显式指向的对象。 @@ -101,39 +101,39 @@ te get "Measures/Revenue/KPI" # KPI sub-object of a measure ### 筛选路径中的通配符 -筛选路径引入了一个通配符字符 `*`,用于匹配单个分段内任意长度的字符序列(贪婪匹配,且仅限单个分段)。 通配符是 `te ls` 和类似命令用来缩小结果范围的方式。 +筛选路径引入了一个通配符字符 `*`,用于匹配单个分段内任意长度的字符序列(贪婪匹配,且仅限单个分段)。 Wildcards are how `te list` and similar commands narrow their results. ```bash -te ls 'Sa*' # Tables whose name starts with Sa -te ls 'Sales/*Amount' # Children of Sales whose name ends with Amount -te ls '*/Amount' # An Amount column/measure across every table -te ls 'Roles/Re*/Members' # Members of every role matching Re* +te list 'Sa*' # Tables whose name starts with Sa +te list 'Sales/*Amount' # Children of Sales whose name ends with Amount +te list '*/Amount' # An Amount column/measure across every table +te list 'Roles/Re*/Members' # Members of every role matching Re* ``` -包含 **N 个分段** 的筛选路径会返回 **N 层深度** 的结果——通配符不会自动多展开一层,结果深度不会超过你输入的层级。 单分段快捷写法 `te ls Sales` 是个例外:未限定且不含通配符的表名会展开为该表的直接子项,以符合“让我看看 Sales 里有什么”的意图。 相比之下,`te ls Sa*` 只返回匹配的表,不会展开。 +包含 **N 个分段** 的筛选路径会返回 **N 层深度** 的结果——通配符不会自动多展开一层,结果深度不会超过你输入的层级。 The single-segment shortcut `te list Sales` is the exception: an unqualified, non-wildcarded table name expands to the table's direct children to match the "show me what's in Sales" intent. `te list Sa*`, in contrast, returns just the matching tables - no expansion. 筛选路径中不支持 DAX 的方括号后缀;如需按字面匹配包含 `[` 和 `]` 的名称,请给名称加引号。 ### 错误和提示 -分段拼写错误时会给出一条与上下文相关的错误;如果 CLI 能猜到你的意图,还会附带“你是不是想输入……”的提示。 缺少父级的路径会在检查叶节点之前失败,因此信息会指向真正出错的分段。 空容器(例如,在没有层次结构的模型上运行 `te ls Hierarchies`)会给出简单的“这里没有内容”提示,而不是错误。 +分段拼写错误时会给出一条与上下文相关的错误;如果 CLI 能猜到你的意图,还会附带“你是不是想输入……”的提示。 缺少父级的路径会在检查叶节点之前失败,因此信息会指向真正出错的分段。 Empty containers (e.g., `te list Hierarchies` on a model without hierarchies) emit a simply "nothing here" hint rather than an error. ## 全局选项 这些标志适用于每个命令,可在子命令名称之前或之后使用。 -| 选项 | 说明 | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `-m, --model ` | 语义模型的路径(TMDL 文件夹、`.bim` 文件或 TE 文件夹)。 | -| `-s, --server ` | Workspace 名称或终结点(例如 `MyWorkspace`、`powerbi://...`、`asazure://...`、`localhost`)。 | -| `-d, --database ` | Workspace 上的语义模型名称。 | -| `--local` | 连接到本地运行的 Power BI Desktop 实例(仅限 Windows)。 | -| `--auth ` | 身份验证方法:`auto`、`interactive`、`spn`、`env`、`managed-identity`(默认值:`auto`)。 | -| `--output-format ` | 标准输出格式:`text` (默认)、`json`、`csv`、`tmsl` (别名 `bim`)、`tmdl`。 `csv` 会被输出表格数据的命令采用;`tmsl`/`tmdl` 仅在 `te get` 和 `te ls` 中用于整个对象的序列化。 命令会拒绝其不支持的格式。 | -| `--error-format ` | 用于错误、警告和提示的 stderr 格式:`text`(默认)或 `json`。 其他值将回退为 `text`。 它独立于 `--output-format`,因此你可以将 JSON 格式的 stdout 与纯文本错误配合使用(反之亦然)。 | -| `--recent [N]` | 使用最近使用过的模型。 未提供值 = 进入交互式选择器;`N` = 最近使用列表中的第 N 个(1 = 最近一次使用)。 | -| `--non-interactive` | 禁用所有交互式提示。 如果缺少必需输入,将给出可操作的错误提示并失败退出。 | -| `--debug` | 启用调试日志并输出到 stderr(连接字符串、身份验证流程、耗时)。 | +| 选项 | 说明 | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `-m, --model ` | Path to semantic model (TMDL folder, `.bim` file, `database.json` folder, or `.SemanticModel` folder). | +| `-s, --server ` | Workspace 名称或终结点(例如 `MyWorkspace`、`powerbi://...`、`asazure://...`、`localhost`)。 | +| `-d, --database ` | Workspace 上的语义模型名称。 | +| `--local` | 连接到本地运行的 Power BI Desktop 实例(仅限 Windows)。 | +| `--auth ` | 身份验证方法:`auto`、`interactive`、`spn`、`env`、`managed-identity`(默认值:`auto`)。 | +| `--output-format ` | 标准输出格式:`text` (默认)、`json`、`csv`、`tmsl` (别名 `bim`)、`tmdl`。 `csv` is honored by commands that emit tabular data; `tmsl`/`tmdl` only by `te get` and `te list` for whole-object serialization. 命令会拒绝其不支持的格式。 | +| `--error-format ` | 用于错误、警告和提示的 stderr 格式:`text`(默认)或 `json`。 其他值将回退为 `text`。 它独立于 `--output-format`,因此你可以将 JSON 格式的 stdout 与纯文本错误配合使用(反之亦然)。 | +| `--recent [N]` | 使用最近使用过的模型。 未提供值 = 进入交互式选择器;`N` = 最近使用列表中的第 N 个(1 = 最近一次使用)。 | +| `--non-interactive` | 禁用所有交互式提示。 如果缺少必需输入,将给出可操作的错误提示并失败退出。 | +| `--debug` | 启用调试日志并输出到 stderr(连接字符串、身份验证流程、耗时)。 | `te --version` 会打印 CLI 版本并退出。 @@ -141,11 +141,17 @@ te ls 'Roles/Re*/Members' # Members of every role matching Re* 位置参数 `` → 全局选项 `--model` → `--server`/`--database`(远程)→ `te connect` 的当前活动连接 → `--recent`。 +> [!NOTE] +> **Mistyped options are rejected up front.** If you pass a `--flag` that isn't recognised on the command you invoked, the CLI exits with an actionable error rather than silently absorbing the token as a positional argument. This catches typos like `--force ` accidentally becoming `--forec` in CI scripts. + +> [!NOTE] +> **Dotted server names.** `-s`/`--server` treats a dotted name (e.g. `Sales.2026`) as an Analysis Services server hostname, not a Power BI workspace. A warning fires when the CLI has to make this call, with a hint to append `.Workspace` (e.g. `Sales.2026.Workspace`) or use a full `powerbi://` URL if you meant the Power BI workspace. Applies to `te connect`, `te deploy`, `te refresh`, `te query`, `te vertipaq`, and `te test run`. + ## 模型 I/O ### load -加载语义模型,并显示模型摘要——名称、兼容级别以及主要对象数量(表、度量值、列)。 +Load a semantic model and display a summary of the model - name, compatibility level, and high-level object counts (tables, measures, columns). ```bash te load ./model # TMDL folder @@ -159,8 +165,8 @@ te load -s MyWorkspace -d MyModel # Remote workspace `te save` 接受: -- `-o, --output-path ` - 目标文件或文件夹。 **可选** - 若省略,`te save` 会写回源位置,保留原始格式。 -- `--serialization ` - `tmdl`, `bim`, `te-folder`, `pbip`, `database.json`。 默认会从已加载的模型中推断(BIM 源 → BIM;TMDL `SemanticModel/` → `definition/` 下的 TMDL)。 +- `-o, --output-path ` - 目标文件或文件夹。 **可选** - 若省略,`te save` 会写回源位置,保留原始格式。 The file extension also drives format inference: `.bim` writes a single-file BIM, `.json` writes a `database.json` folder, and a bare path writes a TMDL folder. +- `--serialization ` - `tmdl`, `bim` (alias `tmsl`), `database.json`, `pbip`. When omitted, the format is inferred from the `-o` path extension (or from the loaded model when `-o` is omitted entirely). - `--force` - 跳过验证并覆盖现有输出。 某些拒绝情况(例如容器不明确、项目根目录中存在多个 `SemanticModel`)即使使用 `--force` 也会触发。 - `--skip-bpa` - 完全绕过 BPA 检查。 - `--fix-bpa` - 当规则定义了修复表达式时,自动修复 BPA 违规项。 @@ -180,10 +186,12 @@ te save -o ./out -s my-workspace -d my-model --skip-validation # Fast download ### open -在 Tabular Editor 3 桌面版中打开模型。 **仅限 Windows**(需要先安装 TE3)。 +在 Tabular Editor 3 桌面版中打开模型。 **仅限 Windows**(需要先安装 TE3)。 With no arguments, launches TE3 with a blank workspace. ```bash -te open ./my-model +te open # Launch TE3 with a blank workspace +te open ./my-model # Open a TMDL folder in TE3 +te open ./model.bim # Open a BIM file in TE3 ``` ### init @@ -196,7 +204,7 @@ te open ./my-model - `--compatibility-mode ` - `PowerBI`(默认)或 `AnalysisServices`。 - `--compatibility-level `(别名 `--compat`)- 兼容级别。 当模式为 `PowerBI` 时,默认值为 `1702`;否则为 `1500`。 参见 @update-compatibility-level。 - `--name ` - 模型/数据库名称(默认:目录名称)。 -- `--serialization ` - `tmdl`(默认)、`bim`、`te-folder`、`pbip`。 +- `--serialization ` - `tmdl` (default), `bim` (alias `tmsl`), `database.json`, `pbip`. - `--force` - 覆盖目标路径下任何现有文件或目录。 ```bash @@ -214,14 +222,18 @@ te init ./existing-dir --force # Overwrite non-empty `te set` 接受以下参数: -- `-q ` - 属性名称(例如 `expression`、`formatString`、`description`、`isHidden`)。 -- `-i ` - 值(使用 `-` 可从 stdin 读取)。 +- `-q ` - 属性名称(例如 `expression`、`formatString`、`description`、`isHidden`)。 **Repeatable** - pair each `-q` with a following `-i` to set multiple properties in one command. +- `-i ` - 值(使用 `-` 可从 stdin 读取)。 One `-i` per `-q`. +- `-t, --type ` - disambiguation when the same path could resolve to multiple object kinds (`Measure`, `Column`, `CalculatedColumn`, `Hierarchy`, `Calendar`, `Partition`, `CalculationItem`). - `--save` / `--save-to ` - 保存更改。 +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). +- `--force` - save even if the mutation introduces DAX validation errors. ```bash te set Sales/Amount -q expression -i "SUM(Sales[Amt])" --save te set "'Net Sales'[Sales Amount]" -q formatString -i "#,0" --save # DAX form with spaced names te set Sales -q isHidden -i true --save +te set Sales/Amount -q formatString -i "#,0" -q description -i "Net sales" --save # Multi-property ``` ### add @@ -231,7 +243,15 @@ te set Sales -q isHidden -i true --save `te add` 支持以下选项: - `-t, --type ` - 指定对象类型。 常用值:`Table`、`Measure`、`Column`、`CalculatedColumn`、`Hierarchy`、`Role`、`Perspective`、`Culture`、`CalculationGroup`、`CalculationItem`。 支持 Tab 自动补全;可通过运行 `te add --help` 获取完整列表。 +- `-i ` - expression or value to assign to the new object (DAX for measures/calculated columns, M for partitions, etc.). Pair with `-q` to set additional properties on the new object in the same command. +- `-q ` - additional property to set on the new object (repeatable; pairs with `-i`). +- `--file ` - read the expression for `-i` from a file instead of inline. +- `--mode ` - storage mode for new tables: `import` (default), `directQuery`, `dual`, `directLake`. - `--if-not-exists` - 如果对象已存在,则直接以 `0` 退出且不报错。 可用于幂等的 CI/CD 管道。 +- `--save` / `--save-to ` - 保存更改。 +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). +- `--source-type ` - initial partition source type on a new table: `m`, `query`, or `calculated`. Overrides heuristic detection. `calculated` is only valid with `-t CalculatedTable`. +- `--force` - save even if the mutation introduces DAX validation errors. ```bash te add Sales/Revenue -t Measure -i "SUM(Sales[Amount])" --save @@ -244,32 +264,42 @@ te add Roles/Reader -t Role --save # New 对于数据绑定表,`te add` 还支持从 SQL、Lakehouse 或 Warehouse 源推断架构。 有关 `--source`、`--endpoint`、`--source-table`、`--columns` 等参数,可查看 `te add --help`。 -### rm +### remove -删除对象。 默认会检查依赖对象,以避免破坏现有引用。 +删除对象。 默认会检查依赖对象,以避免破坏现有引用。 (Alias: `rm`.) -`te rm` 接受: +`te remove` accepts: -- `` — 位置参数:要删除的对象。 -- `--force` — 跳过依赖对象检查。 -- `--if-exists` — 如果对象不存在,则直接以 `0` 退出且不报错。 可用于幂等的 CI/CD 管道。 -- `--dry-run` — 预览删除操作而不实际执行。 -- `--save` — 将更改保存到已加载的模型。 +- `` - positional argument: the object to remove. +- `-t, --type ` - 当路径匹配到表下的多个子对象时,用于消除歧义(例如同名的列和层次结构)。 +- `--force` - bypass the dependents check. +- `--if-exists` - exit `0` without error if the object doesn't exist. 可用于幂等的 CI/CD 管道。 +- `--dry-run` - preview the removal without applying it. +- `--save` / `--save-to ` - persist the change. +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). ```bash -te rm Sales/Revenue --save -te rm "'Sales'[Revenue]" --save # DAX form -te rm Sales/Revenue --dry-run # Preview only -te rm Sales/OldMeasure --if-exists --save # Idempotent +te remove Sales/Revenue --save +te remove "'Sales'[Revenue]" --save # DAX form +te remove Sales/Revenue --dry-run # Preview only +te remove Sales/OldMeasure --if-exists --save # Idempotent ``` -### mv +### move + +移动或重命名模型对象。 源和目标都是 `` 参数。 (Aliases: `mv`, `rename`.) + +`te move` accepts: -移动或重命名模型对象。 源和目标都是 `` 参数。 +- `-t, --type ` - disambiguate when the source path matches multiple object kinds (e.g., a column and a hierarchy with the same name). +- `--save` / `--save-to ` - persist the change. +- `--serialization ` - override the serialization when saving (`tmdl`, `bim` (alias `tmsl`), `database.json`). +- `--force` - save even if the mutation introduces DAX validation errors. ```bash -te mv Sales/Revenue Finance/Revenue --save # Move measure to another table -te mv Sales/Revenue Sales/TotalRevenue --save # Rename measure +te move Sales/Revenue Finance/Revenue --save # Move measure to another table +te move Sales/Revenue Sales/TotalRevenue --save # Rename measure +te move Sales/Date Sales/CalendarDate -t Hierarchy --save # Disambiguate hierarchy from column ``` ### replace @@ -284,7 +314,7 @@ te mv Sales/Revenue Sales/TotalRevenue --save # Rename measure - `--dry-run` - 仅预览更改,不会实际应用。 默认行为。 - `--save` - 将变更保存回源位置。 与 `--revert` 和 `--stage` 互斥。 - `--save-to ` - 保存到不同的路径(意味着 `--save`)。 -- `--serialization ` - 模型序列化格式:`tmdl`、`bim`、`te-folder`。 +- `--serialization ` - model serialization: `tmdl`, `bim` (alias `tmsl`), `database.json`. - `--force` - 即使替换引入 DAX 验证错误,也会保存。 `--in expressions` 会遍历所有包含表达式的属性: @@ -305,31 +335,31 @@ te replace "SUM" "SUMX" --regex --in expressions --save ## 检查 -### ls +### list -以类似文件系统的导航方式列出对象。 接受一个支持通配符的 `` 参数。 同时支持模型级容器(`Tables`, `Measures`, `Columns`, `Hierarchies`, `Relationships`, `Roles`, `Perspectives`, `Cultures`)以及表范围容器(`Sales/Measures`, `Sales/Columns`, …) 均受支持。 +以类似文件系统的导航方式列出对象。 接受一个支持通配符的 `` 参数。 Both model-level containers and table-scoped containers are supported - see the [container keyword table](#containers-and-keywords) above for the full list. (Alias: `ls`.) -`te ls` 支持: +`te list` accepts: - `--type ` - 限定为一种对象类型(`table`, `measure`, `column`, `hierarchy`, `partition`, `relationship`, `role`, `perspective`, `culture`)。 如果不提供 ``,这等同于输入匹配的容器关键字。 - `--paths-only` - 每行输出一个对象路径,适合通过管道传给 `xargs`、`te get` 或 `te set`。 - `--no-multiline` - 将多行单元格(通常是 DAX 或 M 表达式)折叠为单行并截断,让宽表中的各行仍便于浏览。 仅影响文本输出;JSON/CSV/TMSL 输出不受影响。 -- `--output-format tmsl`(别名 `bim`)- 将匹配的对象输出为 TMSL/BIM 脚本。 例如可用于 `te ls Tables --output-format bim > tables.json`。 `ls` 不支持 `--output-format tmdl`(TMDL 仅支持单对象输出——请使用 `te get`)。 +- `--output-format tmsl`(别名 `bim`)- 将匹配的对象输出为 TMSL/BIM 脚本。 Useful for `te list Tables --output-format bim > tables.json`. `ls` 不支持 `--output-format tmdl`(TMDL 仅支持单对象输出——请使用 `te get`)。 ```bash -te ls # All tables in the model -te ls Sales # All children of Sales (columns + measures + hierarchies + partitions) -te ls Sales/Measures # Just Sales's measures -te ls 'Sales/*Amount' # Children of Sales whose name ends with Amount -te ls 'Sa*' # Tables whose name starts with Sa (no auto-expansion) -te ls '*/Amount' # An Amount column/measure across every table -te ls 'Roles/Re*/Members' # Members of every role matching Re* -te ls Sales/Geography/Levels # All levels of the Geography hierarchy -te ls "'Net Sales'/'Sales Amount'" # Quote names containing spaces -te ls Measures --paths-only # One Table/Measure per line for piping -te ls --type measure # Same as `te ls Measures` -te ls Measures --no-multiline # Wide table with column dividers, single-line DAX -te ls Tables --output-format bim > tables.json # All tables emitted as TMSL/BIM +te list # All tables in the model +te list Sales # All children of Sales (columns + measures + hierarchies + partitions) +te list Sales/Measures # Just Sales's measures +te list 'Sales/*Amount' # Children of Sales whose name ends with Amount +te list 'Sa*' # Tables whose name starts with Sa (no auto-expansion) +te list '*/Amount' # An Amount column/measure across every table +te list 'Roles/Re*/Members' # Members of every role matching Re* +te list Sales/Geography/Levels # All levels of the Geography hierarchy +te list "'Net Sales'/'Sales Amount'" # Quote names containing spaces +te list Measures --paths-only # One Table/Measure per line for piping +te list --type measure # Same as `te list Measures` +te list Measures --no-multiline # Wide table with column dividers, single-line DAX +te list Tables --output-format bim > tables.json # All tables emitted as TMSL/BIM ``` ### get @@ -343,7 +373,7 @@ te ls Tables --output-format bim > tables.json # All tables emitted as TMSL/BI - `--output-format tmsl`(别名 `bim`)- 将解析后的对象输出为 TMSL/BIM JSON。 - `--output-format tmdl` - 将解析后的对象输出为 TMDL(仅限命名对象)。 -`te get` 和 `te ls` 共用同一个描述符目录,因此无论输出为哪种格式,属性的呈现方式都一致:文本表格、JSON 和 CSV 显示的都是同一组属性;给模型新增属性后,也会在所有格式中自动可见。 +`te get` and `te list` share a single descriptor catalog, so every property surfaces the same way across formats - the text table, JSON, and CSV all see the same set, and adding a new property to the model exposes it everywhere. ```bash te get Sales/Amount -q expression # Print DAX @@ -381,6 +411,12 @@ te find "CALCULATE" --in expressions --paths-only | xargs -I{} te get {} -q expr ```bash te diff ./model-v1 ./model-v2 te diff old.bim new.bim + +# Branch on exit code (POSIX sh): +te diff ./a ./b; case $? in 0) echo same;; 1) echo different;; *) echo error;; esac + +# Branch on exit code (PowerShell): +te diff ./a ./b; switch ($LASTEXITCODE) { 0 { 'same' } 1 { 'different' } default { 'error' } } ``` ### deps @@ -393,7 +429,7 @@ te diff old.bim new.bim - `--downstream` - 仅显示下游依赖项(即使用此对象的对象)。 - `--deep` - 显示递归依赖树,而不只显示直接依赖关系。 - `--max-depth ` - `--deep` 遍历的最大深度(默认:`10`)。 -- `-t, --type ` - 当路径匹配到表下的多个子对象时,用于消除歧义(例如同名的列和层次结构)。 +- `-t, --type ` - disambiguate when the path matches multiple table-children (e.g., a column and a hierarchy with the same name). - `--unused` - 列出未被任何 DAX 引用,且未用于任何关系、层次结构级别、排序依据、变体、AlternateOf 基对象或日历时间角色的度量值、计算列以及**所有数据列**。 每条结果在文本模式下会显示 `(hidden)`,在 JSON 中则包含 `isHidden` 字段。 - `--hidden` - 将 `--unused` 限制为仅包含隐藏对象。 隐藏且未使用的对象是最安全的清理候选项,因为没有任何用户可见内容依赖它们。 @@ -427,6 +463,9 @@ te validate --ci github --trx results.trx te validate --errors-only # Hide warnings and anti-pattern hints ``` +> [!NOTE] +> `te validate` does not support `--output-format csv` - CSV is rejected up front with an actionable error rather than producing a partial result. Use `text` or `json` for validation output. + ### bpa run 针对模型运行 Best Practice Analyzer 规则。 @@ -445,8 +484,8 @@ te validate --errors-only # Hide warnings and anti-pattern hints - `--fix` - 应用修复表达式,在可能的情况下自动修复违规项。 - `--save` - 应用修复后,将模型保存回原始位置。 - `--save-to ` - 应用修复后,将模型保存到其他路径。 -- `--serialization ` - 模型序列化格式:`tmdl`、`bim`、`te-folder`。 -- `--fail-on ` - 失败阈值:`error`(默认)或 `warning`。 当违规项达到该阈值时,将以退出代码 `1` 退出。 +- `--serialization ` - model serialization: `tmdl`, `bim` (alias `tmsl`), `database.json`. +- `--fail-on ` - 失败阈值:`error`(默认)或 `warning`。 当违规项达到该阈值时,将以退出代码 `1` 退出。 Rule-loading or evaluation errors (invalid expressions, unreadable rule files) also cause a non-zero exit regardless of `--fail-on`. - `--ci ` - 向 stderr 输出 CI 日志命令:`vsts`(Azure DevOps)、`github`(GitHub Actions)。 - `--trx ` - 将结果作为 VSTEST `.trx` 文件写入指定路径。 - `--no-multiline` - 将违规表中的多行单元格内容折叠为单行。 仅文本输出。 @@ -481,21 +520,21 @@ Rules loaded: 41 from 1 file(s) from bpa.rules config + built-in defaults + mode ### bpa rules -管理 BPA 规则集——在本地规则文件或模型注释中列出、检查、初始化,以及启用或禁用规则。 内置规则是只读的。要跳过其中某一条而保留其余规则,请使用 `te bpa rules disable`(不要直接编辑内置规则集)。 +Manage BPA rule collections - list, inspect, initialize, and toggle rules in your local rules file or in model annotations. 内置规则是只读的。要跳过其中某一条而保留其余规则,请使用 `te bpa rules disable`(不要直接编辑内置规则集)。 子命令: -| 子命令 | 用途 | -| ------------------------------- | ---------------------------- | -| `add [model]` | 添加新的 BPA 规则。 | -| [`disable`](#bpa-rules-disable) | 为当前用户禁用一条内置 BPA 规则。 | -| [`enable`](#bpa-rules-enable) | 重新启用先前已禁用的内置 BPA 规则。 | -| `ignore [model]` | 将规则添加到模型的忽略列表。 | -| [`init`](#bpa-rules-init) | 在解析后的 PATH 下创建一个空的 BPA 规则文件。 | -| [`list`](#bpa-rules-list) | 列出来自所有来源的 BPA 规则及其状态。 | -| `rm [model]` | 删除一条 BPA 规则。 | -| `set [model]` | 更新 BPA 规则的属性。 | -| `unignore [model]` | 从模型的忽略列表中移除一条规则。 | +| 子命令 | 用途 | +| ---------------------------------------------------------- | ---------------------------- | +| `add [model]` | 添加新的 BPA 规则。 | +| [`disable`](#bpa-rules-disable) | 为当前用户禁用一条内置 BPA 规则。 | +| [`enable`](#bpa-rules-enable) | 重新启用先前已禁用的内置 BPA 规则。 | +| `ignore [model]` | 将规则添加到模型的忽略列表。 | +| [`init`](#bpa-rules-init) | 在解析后的 PATH 下创建一个空的 BPA 规则文件。 | +| [`list`](#bpa-rules-list) | 列出来自所有来源的 BPA 规则及其状态。 | +| `remove [model]` (alias `rm`) | 删除一条 BPA 规则。 | +| `set [model]` | 更新 BPA 规则的属性。 | +| `unignore [model]` | 从模型的忽略列表中移除一条规则。 | `te bpa rules` 的所有子命令都接受以下选项: @@ -503,7 +542,7 @@ Rules loaded: 41 from 1 file(s) from bpa.rules config + built-in defaults + mode - `--model-rules` - 操作嵌入在模型注释中的规则,而非文件中的规则。 > [!IMPORTANT] -> `te bpa rules set` 和 `te bpa rules rm` 会拒绝修改内置规则 ID。 如果尝试这样做,命令将以退出码 `1` 退出,并提示改用 `te bpa rules disable`。 要自定义内置规则的行为,先禁用该内置规则,再添加一个使用不同 ID 的自定义副本: +> `te bpa rules set` and `te bpa rules remove` refuse to mutate built-in rule IDs. 如果尝试这样做,命令将以退出码 `1` 退出,并提示改用 `te bpa rules disable`。 要自定义内置规则的行为,先禁用该内置规则,再添加一个使用不同 ID 的自定义副本: > > ```bash > te bpa rules disable TE3_BUILT_IN_DATE_TABLE_EXISTS @@ -532,7 +571,7 @@ te bpa rules list --ignored #### bpa rules init -在配置的 PATH 处创建一个空的 BPA 规则文件(`[]`)。 在对尚不存在的路径执行 `te bpa rules set` / `te bpa rules rm` 之前,请先执行一次此命令。 +在配置的 PATH 处创建一个空的 BPA 规则文件(`[]`)。 Use this once before invoking `te bpa rules set` / `te bpa rules remove` against a path that does not yet exist. `te bpa rules init` 接受以下选项: @@ -547,11 +586,44 @@ te bpa rules init --rules-file ./MyRules.json te bpa rules init --force ``` +#### bpa rules add / set / remove / ignore / unignore + +Mutate the rules file (`add`, `set`, `remove` (alias `rm`)) or model-embedded ignore list (`ignore`, `unignore`). All three mutating subcommands operate on `--rules-file ` or `--model-rules` and refuse to touch built-in rule IDs. + +- `te bpa rules add ` - create a new rule. Pass each property as a named option: + - `--name ` - human-readable rule name (required). + - `--scope ` - comma-separated object kinds the rule applies to: `Measure`, `Column`, `Table`, `Hierarchy`, `Partition`, `Relationship`, `Role`, `Perspective`, `Culture`, etc. (required). + - `--expression ` - Dynamic LINQ predicate. Returns `true` for objects that violate the rule (required). + - `--category ` - grouping label (e.g. `Performance`, `Naming`, `DAX Expressions`). + - `--severity <1|2|3>` - `1` (info), `2` (warning, default), `3` (error). + - `--description ` - user-facing description shown when the rule fires. + - `--fix-expression ` - Dynamic LINQ expression used by `te bpa run --fix` to auto-remediate. +- `te bpa rules set ` - update properties on an existing rule. Uses `-q -i ` pairs (repeatable). Property names: `name`, `expression`, `scope`, `category`, `severity`, `description`, `fixExpression`. +- `te bpa rules remove ` - remove a rule. +- `te bpa rules ignore ` - add a rule ID to the model's `BestPracticeAnalyzer_IgnoreRules` annotation. +- `te bpa rules unignore ` - remove a rule ID from the model's ignore list. + +```bash +# Add a rule: measures that are not hidden and have no description +te bpa rules add MEASURE_NEEDS_DESCRIPTION \ + --name "Measures should have a description" \ + --scope Measure \ + --expression "not IsHidden and string.IsNullOrEmpty(Description)" \ + --severity 2 \ + --category Metadata + +# Update severity on an existing rule +te bpa rules set MEASURE_NEEDS_DESCRIPTION -q severity -i 3 + +# Remove the rule +te bpa rules remove MEASURE_NEEDS_DESCRIPTION +``` + #### bpa rules disable 禁用单个内置 BPA 规则。 该规则 ID 会添加到 CLI 配置中的 `bpa.disabledBuiltInRuleIds`。 后续的门禁执行(deploy、save、mutation)以及 `te bpa run` 都会跳过已禁用的规则。 -该命令是幂等的——对已禁用的规则再次运行 `disable` 会成功,但不会修改配置。 如果 `` 不是内置规则,命令会以退出代码 `1` 结束;可使用 `te bpa rules list` 查看有效的内置 ID。 +The command is idempotent - running `disable` against an already-disabled rule succeeds without modifying the config. 如果 `` 不是内置规则,命令会以退出代码 `1` 结束;可使用 `te bpa rules list` 查看有效的内置 ID。 ```bash te bpa rules disable TE3_BUILT_IN_DATE_TABLE_EXISTS @@ -571,6 +643,7 @@ te bpa rules enable TE3_BUILT_IN_DATE_TABLE_EXISTS `te vertipaq` 支持: +- `` - optional positional argument: a table name to filter the analysis to a single table. - `--columns`, `--relationships`, `--partitions`, `--all`。 - `--detail` - 显示扩展列(数据/字典/层次结构大小明细、编码、分段)。 - `--fields ` - 要显示的字段,以逗号分隔(例如:`--fields name,card,size,%tbl,%db,bar`)。 可用字段因视图而异。 @@ -578,10 +651,12 @@ te bpa rules enable TE3_BUILT_IN_DATE_TABLE_EXISTS - `--import ` - 加载之前导出的 `.vpax` 文件并进行离线分析。 - `--obfuscate` - 对导出的 VPAX 中的名称和表达式进行混淆处理。 - `--top `、`--stats`、`--annotate`、`--save`。 +- `--auth ` - auth method override when connecting to a remote model. ```bash -te vertipaq # Columns by size (default) -te vertipaq --all # Tables, columns, relationships, partitions +te vertipaq # Columns by size (default) +te vertipaq Sales # Stats limited to the Sales table +te vertipaq --all # Tables, columns, relationships, partitions te vertipaq --export stats.vpax te vertipaq --import stats.vpax # Analyze offline ``` @@ -616,7 +691,8 @@ te format --lang m --save # Format M `te query` 支持以下选项: -- `-q, --query ` - 内联查询。 +- `` - positional argument: the DAX query to execute. Equivalent to passing `-q`. Use whichever shape reads better; explicit `-q` wins if both are supplied. +- `-q, --query ` - inline query (named-flag form of the positional above). - `--file ` - 从文件读取查询。 - `--limit ` - 默认为 100。 - `-o, --output-file ` - 将结果写入文件(`.csv`、`.tsv`、`.json`、`.dax`)。 @@ -624,7 +700,8 @@ te format --lang m --save # Format M - `--no-validate` - 跳过执行前的 DAX 语义验证。 ```bash -te query -q "EVALUATE TOPN(5, 'Sales')" -s my-ws -d my-model +te query "EVALUATE TOPN(5, 'Sales')" -s my-ws -d my-model # Positional DAX +te query -q "EVALUATE TOPN(5, 'Sales')" -s my-ws -d my-model # Named-flag form te query --file query.dax --output-format json ``` @@ -679,15 +756,29 @@ echo "Info(Model.Name);" | te script -e - 子命令: -| 子命令 | 用途 | -| ---------------------------------- | ------------------- | -| `list` | 列出宏。 | -| 宏:[`run `](#macro-run) | 运行宏。 | -| `add ` | 添加宏。 | -| `set ` | 更新宏属性。 | -| `rm ` | 删除宏。 | -| `sort` | 排序并重新分配 ID。 | -| 宏:[`init`](#macro-init) | 在解析得到的路径处创建一个空的宏文件。 | +| 子命令 | 用途 | +| ----------------------------------------------------- | ------------------- | +| `list` | 列出宏。 | +| 宏:[`run `](#macro-run) | 运行宏。 | +| `add ` | 添加宏。 | +| `set ` | 更新宏属性。 | +| `remove ` (alias `rm`) | 删除宏。 | +| `sort` | 排序并重新分配 ID。 | +| 宏:[`init`](#macro-init) | 在解析得到的路径处创建一个空的宏文件。 | + +#### macro add / set / remove + +Mutate the macros file (`add`, `set`, `remove` (alias `rm`)). All three operate on `--macros ` (or the resolved macros file). + +- `te macro add ` - create a new macro. Provide the script body via `-e ""` (inline) or `-s ` (script file). Optional: `--tooltip `, `--contexts ` (where the macro applies, e.g., `Table,Measure`), `--enabled true|false`. +- `te macro set ` - update macro properties. Use `-q -i ` pairs (repeatable). Property names: `name`, `execute`, `enabled`, `tooltip`, `validContexts`. +- `te macro remove ` - remove a macro. + +```bash +te macro add MyMacro -e "Info(Selected.Measure.Name);" --tooltip "Print measure name" --contexts Measure +te macro set MyMacro -q tooltip -i "Updated tooltip" +te macro remove MyMacro +``` #### macro init @@ -742,7 +833,7 @@ te macro run "Format DAX" --on "'Net Sales'[Sales Amount]" --save # DAX form w - `--bpa-rules ` - 可重复指定;仅针对本次部署覆盖 CLI 配置中的 `bpa.rules`。 除非 `bpa.builtInRules` 为 `false`,否则内置规则仍会生效。 - `--force` - 跳过交互式确认(CI 必需)。 - `--ci ` - `vsts` 或 `github`。 -- `--profile ` - 一次性使用已保存的 @te-cli-auth 配置文件。 +- `-p, --profile ` - one-shot use of a saved @te-cli-auth profile. ```bash te deploy ./model -s my-workspace -d my-model --force --ci github @@ -753,18 +844,21 @@ te deploy ./model --profile staging --force > [!IMPORTANT] > `te deploy` 会在执行前运行 Best Practice Analyzer 作为门控检查。 在交互模式下,会显示摘要和确认提示,且 **默认安全选项为 `n`**。 在 CI 中,传入 `--force` 可跳过该提示。 BPA 门控配置请参见 @te-cli-config。 +> [!NOTE] +> When `--output-format json` is set, `te deploy`'s JSON payload always includes the resolved `server` and `database`, even when they were resolved from active connection or profile rather than passed explicitly. Pipelines can use these fields to confirm the deploy target without re-parsing the command line. `te deploy` and `te format` also exit non-zero on failure under `--output-format json`, matching their text-mode behavior - the JSON payload is the failure record, not a success signal. + ### refresh 在已部署的模型上触发数据刷新。 `te refresh` 支持: -- `--type ` - `full`、`dataonly`、`automatic`、`calculate`、`clearvalues`、`defragment`、`add`(默认值:`automatic`)。 +- `--type ` - `full`, `dataonly` (alias `data-only`, `data`), `automatic` (alias `auto`), `calculate` (alias `calc`), `clearvalues` (alias `clear`), `defragment` (alias `defrag`), `add` (default: `automatic`). - `--table ` - 刷新特定表(可为多个);可重复指定。 - `--partition ` - 刷新特定分区(可为多个)。 - `--apply-refresh-policy` - 应用增量刷新的刷新策略,以确定要刷新的分区。 - `--effective-date ` - 设置刷新策略使用的生效日期。 -- `--max-parallelism ` - 设置可并行刷新的最大分区数。 +- `--max-parallelism ` - 设置可并行刷新的最大分区数。 Wraps the refresh in a TMSL `sequence` command. - `--dry-run` - 输出 TMSL 脚本而不执行。 - `--no-progress`, `--trace [path]`。 @@ -782,7 +876,7 @@ te refresh --type full --dry-run > refresh.tmsl # Emit TMSL only te incremental-refresh show
``` -其他子命令(`set`、`rm`、`apply`)可通过 `te incremental-refresh --help` 查看说明。 +Additional subcommands (`set`, `remove` (alias `rm`), `apply`) are documented via `te incremental-refresh --help`. ## 测试 @@ -819,12 +913,14 @@ te test init --from-model --model ./my-model # Generate stubs from your measure 设置(或显示)当前终端会话的活动连接。 查看 @te-cli-auth。 ```bash -te connect # Show current active connection -te connect my-workspace my-model # Remote -te connect ./model # Local -te connect --local # Power BI Desktop (Windows) -te connect --profile prod # Activate a saved profile -te connect --clear # Clear the active connection (and any workspace mirror) +te connect # Show current active connection +te connect my-workspace my-model # Remote (positional) +te connect -s my-workspace -d my-model # Remote (named-flag form) +te connect ./model # Local +te connect --local # Power BI Desktop (Windows) +te connect --local my-report # Filter by report name (multiple PBI Desktop instances) +te connect --profile prod # Activate a saved profile +te connect --clear # Clear the active connection (and any workspace mirror) ``` #### 工作区模式(`-w` / `--workspace`) @@ -833,11 +929,11 @@ te connect --clear # Clear the active connection (and any worksp - `te connect -w ./src` - 主源为远程;`./src` 会接收初始 TMDL 导出,并在每次保存时保持镜像同步。 - `te connect ./src -w ` - 主源为本地;首次部署会将模型推送到 Workspace,后续保存会自动重新部署。 -- `--workspace-format ` - 在镜像到文件夹/文件时选择磁盘上的格式(例如,`-w ./model.bim` 会推断为 BIM)。 +- `--workspace-format ` - choose the on-disk format when mirroring to a folder/file: `tmdl`, `bim` (alias `tmsl`), or `database.json`. When omitted, the format is inferred from the workspace target path (e.g., `-w ./model.bim` infers BIM). - `--workspace-auth ` - 当主目标为本地时,为远程 Workspace 目标指定身份验证方式。 若设置了 `--auth`,则默认与其一致;否则默认为 `auto`。 - `--force` - 当目标已存在(例如文件夹非空或数据库已存在)时必须使用。 如果不使用它,`te connect` 会显示交互式 `y/n` 提示,并以 `n` 作为安全的默认选项。 -启用后,`te set --save`、`te rm --save`、`te script --save` 等都会透明地同时保存到本地和远程。 保存顺序始终是 **先本地,后远程**,因此即使推送到服务器失败,磁盘上的副本也会反映最新的用户更改。 使用 `te connect --clear` 清除镜像。 +Once active, `te set --save`, `te remove --save`, `te script --save`, etc. all dual-save transparently. 保存顺序始终是 **先本地,后远程**,因此即使推送到服务器失败,磁盘上的副本也会反映最新的用户更改。 使用 `te connect --clear` 清除镜像。 ```bash te connect Finance "Revenue Model" -w ./revenue-model # Mirror remote → local TMDL @@ -854,21 +950,17 @@ te connect ./revenue-model -w Finance "Revenue Model" # Mirror local → remo ## 配置 -### config show / paths / init / set +### config list / paths / init / set -查看和管理 CLI 配置以及 TE3 PATH 覆盖设置。 参见 @te-cli-config。 +查看和管理 CLI 配置以及 TE3 PATH 覆盖设置。 (`te config list` alias: `ls`.) 参见 @te-cli-config。 ```bash -te config show # Display all settings +te config list # Display all settings te config paths # Resolved TE3 file paths te config init # Create default config te config set autoFormat true ``` -### license - -`te license` 保留用于正式发布 GA 版,在此预览版本中不可用。 这个命令仍会被解析器识别——所以调用它的现有脚本不会在解析阶段报错——但所有子命令都会以状态 `1` 退出,并显示“此预览版本中不可用”的信息。 关于更全面的许可说明,请参见概述页面上的[预览说明](xref:te-cli#preview-notice)。 - ### migrate 说明旧版 Tabular Editor 2 CLI 参数如何映射到新 CLI 的参考指南。 在迁移基于 TE2 的管道时,可作为实时速查参考。 完整迁移指南参见 @te-cli-migrate。 @@ -885,10 +977,19 @@ te migrate --output-format json # Machine-readable mapping 使用具备模型感知能力的提示词启动引导式 REPL 会话。 参见 @te-cli-interactive。 +`te interactive` accepts: + +- `` - optional positional argument: start the session with a local model, `.bim` file, or `.SemanticModel` folder loaded. +- `--no-banner` - skip the welcome banner on startup. Useful when driving the REPL from scripts. +- `--echo` - echo each executed command to stdout before its output. Helpful when piping commands via stdin so the log shows what was run. +- `--batch` - non-interactive batch mode: read commands from stdin line by line, execute each, and exit on EOF. Automatically enabled when stdin is redirected. +- `--no-batch` - force interactive TTY mode even when stdin is redirected (mutually exclusive with `--batch`). + ```bash te interactive # Connect later te interactive ./model # Start with a local model te interactive -s MyWorkspace -d MyModel # Start with a remote model +printf "list Measures\nexit\n" | te interactive ./model # Pipe commands via stdin ``` 引号和 DAX 风格的引用在会话内外的用法一致——有关 REPL 中支持括号感知的 argv 拆分的详细信息,请参见上文的[对象路径](#object-paths)一节以及 @te-cli-interactive。 @@ -932,11 +1033,11 @@ te completion fish ## 退出代码 -| 退出代码 | 含义 | -| ---- | -------------------------------------------------------------------------- | -| `0` | 成功。 | -| `1` | 通用失败(参数无效、命令执行失败、校验错误、身份验证失败、BPA 门禁在严重级别 ≥ error 时未通过)。 用于 `te diff`:发现差异。 | -| `2` | 仅适用于 `te diff`:比较时发生错误,因此差异状态未知。 | +| 退出代码 | 含义 | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `0` | 成功。 | +| `1` | Generic failure (invalid arguments, command failed, validation errors, auth failure, BPA gate failed at severity >= error). 用于 `te diff`:发现差异。 | +| `2` | 仅适用于 `te diff`:比较时发生错误,因此差异状态未知。 | 如需在 CI 管道中进行更细致的控制,可将退出代码与 `--ci ` 注释以及 `--trx` 结果文件结合使用——参见 @te-cli-cicd。 From 87a5b6e0c40634d08b33207869589c6a9bc4be18 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:32 +0200 Subject: [PATCH 33/49] New translations te-cli-config.md (Chinese Simplified) [ci skip] --- .../content/features/te-cli/te-cli-config.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-config.md b/localizedContent/zh/content/features/te-cli/te-cli-config.md index 29c8744da..9b8e202fd 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-config.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-config.md @@ -19,13 +19,13 @@ applies_to: Tabular Editor CLI 可从 JSON 文件读取可选配置。 配置控制三类内容: -- **文件路径** — CLI 在何处读取宏、BPA 规则和 (可选) TE3 Desktop 可执行文件,以及在何处写入查询日志。 -- **行为默认值** — BPA 门控、自动格式化、验证。 -- **已保存的连接配置文件** — 可在不同命名配置文件之间切换的列表。 +- **File paths** - where the CLI reads macros, BPA rules, and (optionally) the TE3 Desktop executable, and where to write the query log. +- **Behavioral defaults** - BPA gates, auto-format, validation. +- **Saved connection profiles** - the list of named profiles you can switch between. CLI 是自包含的 - 它不会从任何 Tabular Editor 3 桌面版安装路径读取或写入任何内容。 BPA 规则和宏文件必须通过此配置显式设置(或按需使用 `te bpa rules init` / `te macro init` 进行初始化)。 -大多数用户无需直接编辑配置文件;`te config show`、`te config set ` 和 `te profile set` 已涵盖常见操作。 +Most users don't need to edit the config file directly - `te config list`, `te config set `, and `te profile set` cover the common operations. ## 配置文件位置 @@ -35,7 +35,7 @@ CLI 是自包含的 - 它不会从任何 Tabular Editor 3 桌面版安装路径 2. `~/.config/te/config.json`(在 Windows 上为 `%USERPROFILE%\.config\te\config.json`)。 3. 如果没有配置文件,CLI 将使用内置默认值。 -`TE_CONFIG` 在所有配置文件相关操作中都会被一致地遵循;`te config show`、`te config set`、`te config init` 和 `te config paths` 都会在解析后的 PATH 上进行读写。 这主要用于测试、脚本化安装以及按环境进行配置。 +`TE_CONFIG` is honored consistently by every config-file operation - `te config list`, `te config set`, `te config init`, and `te config paths` all read and write at the resolved path. 这主要用于测试、脚本化安装以及按环境进行配置。 要创建默认配置: @@ -47,15 +47,15 @@ te config init --force # Overwrite existing config ## 查看配置 ```bash -te config show # Display all settings -te config show --output-format json # Machine-readable +te config list # Display all settings +te config list --output-format json # Machine-readable te config paths # Show resolved macros and BPA rule paths ``` 使用 `te config paths` 查看 CLI 实际会为宏和 BPA 规则使用哪些文件。 这在调试缺失的数据文件时很有用。 输出会显示两行:`macros` (解析后的宏文件路径或 `[not set]`) 和 `bpa.rules` (由路径解析器解析出的第一个存在的 BPA 规则文件,或 `[not set]`)。 > [!NOTE] -> 在 `--output-format json` 模式下,`te config paths` 会显式输出值为 `null` 的字段 (例如 `{"macros": null, "bpa": {"rules": null}}`)。 报告解析结果本来就是此命令的全部用途,因此 `null` 表示“尝试过,但未解析到任何内容”,这是一个有意义的结果。 `te config show --output-format json` 默认会剔除值为 `null` 的字段,因此使用方应以容错方式解析。 +> 在 `--output-format json` 模式下,`te config paths` 会显式输出值为 `null` 的字段 (例如 `{"macros": null, "bpa": {"rules": null}}`)。 报告解析结果本来就是此命令的全部用途,因此 `null` 表示“尝试过,但未解析到任何内容”,这是一个有意义的结果。 `te config list --output-format json` strips null fields by default, so consumers should parse it tolerantly. ## 设置值 @@ -79,7 +79,7 @@ te config set macros null # Clear a path override ```json { - "formatVersion": 1, + "formatVersion": 2, "macros": null, "autoFormat": false, "validateOnMutation": true, @@ -144,10 +144,10 @@ CLI 不会自动检测 TE3 的任何安装位置——请显式配置这些项 | 键名 | 默认值 | 说明 | | ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `autoFormat` | `false` | 在执行 `te add` / `te set` / `te mv` / `te macro run` 之后,对修改过的表达式运行 DAX Formatter。 默认使用内置格式化程序;可通过 `formatOptions.useSqlBiDaxFormatter` 改用 SQL BI Web 服务。 | +| `autoFormat` | `false` | Run the DAX Formatter on modified expressions after `te add` / `te set` / `te move` / `te macro run`. 默认使用内置格式化程序;可通过 `formatOptions.useSqlBiDaxFormatter` 改用 SQL BI Web 服务。 | | `validateOnMutation` | `true` | 在执行更改命令(`add`、`set`、`mv`、`replace --save`、`macro run`)后,检查模型中的每个 `Table[Column]` 引用是否仍可解析。 可在部署前捕获因重命名或删除而引入的悬空引用。 | | `bpa.onMutation` | `false` | 在每次更改命令(`set`、`add`、`mv`、`rm`、`macro run`)后,运行一次限定范围的 BPA 分析。 只检查受影响表中的对象,而不是整个模型——这对于迭代编辑时获得快速反馈很有用。 | -| `bpa.onDeploy` | `true` | 在执行 `te deploy` 之前运行 BPA 关卡检查。 如果有任一规则触发且严重级别 ≥ error,则中止部署。 可通过 `--skip-bpa` 在单次调用中跳过,或通过 `--fix-bpa` 自动修复。 | +| `bpa.onDeploy` | `true` | 在执行 `te deploy` 之前运行 BPA 关卡检查。 The deploy is aborted if any rule fires at severity >= error. 可通过 `--skip-bpa` 在单次调用中跳过,或通过 `--fix-bpa` 自动修复。 | | `bpa.onSave` | `true` | 在 `te save -o` 写入磁盘之前运行 BPA 关卡检查。 可通过 `--skip-bpa` 或 `--force` 在单次调用中跳过。 | | `bpa.builtInRules` | `true` | 每次运行关卡检查时,都包含精选的内置 BPA 规则集。 设为 `false` 可完全忽略内置规则;此时关卡检查只运行通过 `bpa.rules` 配置的规则以及嵌入模型中的规则。 | | `bpa.disabledBuiltInRuleIds` | `null` | 要从门禁中排除的各个内置规则的 ID。 可通过 `te bpa rules disable ` / `te bpa rules enable ` 修改——优先使用这些命令,而不是直接编辑该数组。 | @@ -200,11 +200,11 @@ BPA 闸门是一道安全防线,用于防止存在规则违规的模型被保 - `te deploy` 会触发闸门检查,除非传入 `--skip-bpa` 或 `bpa.onDeploy` 为 `false`。 - `te save` 会触发闸门检查,除非传入 `--skip-bpa`(或 `--force`)或 `bpa.onSave` 为 `false`。 -- `te add`、`te set`、`te mv`、`te macro run` 仅在 `bpa.onMutation` 为 `true` 时才会运行闸门。 +- `te add`, `te set`, `te move`, `te macro run` run the gate only when `bpa.onMutation` is `true`. 闸门检查会从 `bpa.rules` 加载 BPA 规则,并且默认还会加载内置规则集(由 `bpa.builtInRules` 控制)。 可通过 `bpa.disabledBuiltInRuleIds` 单独排除内置规则——可使用 `te bpa rules disable ` / `te bpa rules enable ` 管理。 -当闸门检查触发并发现严重性 ≥ `error` 的违规项时,命令会失败,退出代码为 `1`,并输出违规摘要。 处理选项: +When the gate fires and finds violations at severity >= `error`, the command fails with exit code `1` and a summary of the violations. 处理选项: - `--fix-bpa` - 在内存中将规则的 `fixExpression` 应用于部署/保存产物;不会修改源文件。 - `--skip-bpa` - 仅对本次命令禁用闸门检查。 @@ -219,13 +219,13 @@ te bpa run ./model --fix --save # Apply fixes to the source ### 内置 BPA 规则 -CLI 随附一套权威的内置 BPA 规则集,并以 JSON 资源的形式嵌入其中。 内置规则是只读的:`te bpa rules set` 和 `te bpa rules rm` 拒绝修改内置 ID,并引导用户改用 `te bpa rules disable`。 如果想自定义内置规则的行为,可以把它复制到本地规则文件中,作为一个使用不同 ID 的新规则,然后再禁用内置规则。 +CLI 随附一套权威的内置 BPA 规则集,并以 JSON 资源的形式嵌入其中。 Built-in rules are read-only - `te bpa rules set` and `te bpa rules remove` refuse to mutate built-in IDs and point users at `te bpa rules disable` instead. 如果想自定义内置规则的行为,可以把它复制到本地规则文件中,作为一个使用不同 ID 的新规则,然后再禁用内置规则。 `bpa.builtInRules` 和 `bpa.disabledBuiltInRuleIds` 会一致地应用于部署/保存/变更的门控检查 **以及** 手动执行的 `te bpa run` 命令——通过 `te bpa rules disable` 禁用一次后,该规则将在所有场景中被排除。 ## 变更后行为 -运行会产生变更的命令(`te add`、`te set`、`te mv`、`te replace --save`、`te macro run`)时,CLI 会自动执行以下检查: +When you run a mutating command (`te add`, `te set`, `te move`, `te replace --save`, `te macro run`), the CLI performs these checks automatically: 1. **TOM 错误**始终会被提示。 度量值、列、分区或计算项中的无效 DAX 或 M 始终会导致命令失败。 2. **架构验证** (`validateOnMutation`,默认值为 `true`) 会验证 DAX 中的 `Table[Column]` 引用是否仍可解析,并交叉检查元数据一致性。 From 692de6afad7733cae82d33ca47dafc8ec8e143ea Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:35 +0200 Subject: [PATCH 34/49] New translations te-cli-limitations.md (Chinese Simplified) [ci skip] --- .../features/te-cli/te-cli-limitations.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-limitations.md b/localizedContent/zh/content/features/te-cli/te-cli-limitations.md index c92afb796..46749a486 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-limitations.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-limitations.md @@ -41,12 +41,12 @@ CLI 会针对你在 Tabular Editor 2 和 3 中使用的同一个 `Model` 对象 ## Best Practice Analyzer -| 限制 | 说明 / 变通方法 | -| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **BPA 规则源必须是 HTTPS URL 或本地文件路径** | 只接受 `https://` URL 和不带协议的本地文件路径。 系统能识别 `http://`,但会在加载时故意拒绝,并给出清晰的错误信息——BPA 规则是可执行的规则表达式,通过未经过身份验证的通道获取会有被篡改的风险。 其他 URL 方案(`file://`、`ftp://`、…) 不受支持。 这同时适用于 `te bpa run --rules`,以及通过 [`te config set`](xref:te-cli-commands#config-show--paths--init--set) 配置的规则列表。 | -| **规则 URL 的验证在运行阶段进行,而不是在 `te config set` 时** | 像 `http://` 这样的拼写错误会被 `te config set` 接受,只有在 BPA 实际运行时才会暴露出来。 编辑已配置的规则源后,运行一次 `te bpa run`(或 `te validate`),以验证每个 URL 都能成功加载。 | -| **`--rules` 不会禁用内置规则** | 传入 `te bpa run --rules ` 时,提供的规则会在本次调用中替换 [`bpa.rules`](xref:te-cli-commands#config-show--paths--init--set) 和 `TE_BPA_RULES` 中的条目,但内置默认规则仍会一并加载。 若只想运行显式指定的规则文件,还需传入 `--no-defaults`。 | -| **没有可在单次调用中跳过 `bpa.rules` 配置的标志** | 配置了 `bpa.rules` 后,每次执行 `te bpa run` 都会在加载内置规则的同时加载这些规则。 目前没有可在单次运行中跳过已配置规则文件的标志。 变通方法:显式传入 `--rules `——该标志会在本次调用中完全替换 `bpa.rules` 和 `TE_BPA_RULES`。 | +| 限制 | 说明 / 变通方法 | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **BPA 规则源必须是 HTTPS URL 或本地文件路径** | 只接受 `https://` URL 和不带协议的本地文件路径。 系统能识别 `http://`,但会在加载时故意拒绝,并给出清晰的错误信息——BPA 规则是可执行的规则表达式,通过未经过身份验证的通道获取会有被篡改的风险。 其他 URL 方案(`file://`、`ftp://`、…) 不受支持。 Applies to both `te bpa run --rules` and the rule list configured via [`te config set`](xref:te-cli-commands#config-list--paths--init--set). | +| **规则 URL 的验证在运行阶段进行,而不是在 `te config set` 时** | 像 `http://` 这样的拼写错误会被 `te config set` 接受,只有在 BPA 实际运行时才会暴露出来。 编辑已配置的规则源后,运行一次 `te bpa run`(或 `te validate`),以验证每个 URL 都能成功加载。 | +| **`--rules` 不会禁用内置规则** | When `te bpa run --rules ` is passed, the supplied rules replace the entries in [`bpa.rules`](xref:te-cli-commands#config-list--paths--init--set) and `TE_BPA_RULES` for that invocation, but the built-in defaults still load alongside. 若只想运行显式指定的规则文件,还需传入 `--no-defaults`。 | +| **没有可在单次调用中跳过 `bpa.rules` 配置的标志** | 配置了 `bpa.rules` 后,每次执行 `te bpa run` 都会在加载内置规则的同时加载这些规则。 目前没有可在单次运行中跳过已配置规则文件的标志。 变通方法:显式传入 `--rules `——该标志会在本次调用中完全替换 `bpa.rules` 和 `TE_BPA_RULES`。 | ## 验证 @@ -56,9 +56,9 @@ CLI 会针对你在 Tabular Editor 2 和 3 中使用的同一个 `Model` 对象 ## 模型 I/O -| 限制 | 说明 / 变通方法 | -| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **`--serialization` 不能将序列化格式与 PBIP 容器组合使用** | [`te save`](xref:te-cli-commands#save) 的 `--serialization` 选项将 `bim`、`tmdl`、`te-folder` 和 `pbip` 视为互斥选项,因此目前无法为采用 TMSL 序列化 (`.bim`) 的模型生成 PBIP 容器。 将 TMDL 保存到 PBIP 中,或将 `.bim` 保存在 PBIP 容器之外。 | +| 限制 | 说明 / 变通方法 | +| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **`--serialization` 不能将序列化格式与 PBIP 容器组合使用** | The `--serialization` option on [`te save`](xref:te-cli-commands#save) treats `bim`, `tmdl`, `database.json`, and `pbip` as mutually exclusive, so you cannot currently produce a PBIP container around a TMSL-serialized (`.bim`) model. 将 TMDL 保存到 PBIP 中,或将 `.bim` 保存在 PBIP 容器之外。 | ## 身份验证 From 1a1b4eac28030c5433610c259634c452f8a5300c Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:38 +0200 Subject: [PATCH 35/49] New translations te-cli-preview-notice.md (Chinese Simplified) [ci skip] --- .../content/features/te-cli/includes/te-cli-preview-notice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/zh/content/features/te-cli/includes/te-cli-preview-notice.md b/localizedContent/zh/content/features/te-cli/includes/te-cli-preview-notice.md index f77a5378b..df39c7c39 100644 --- a/localizedContent/zh/content/features/te-cli/includes/te-cli-preview-notice.md +++ b/localizedContent/zh/content/features/te-cli/includes/te-cli-preview-notice.md @@ -1,2 +1,2 @@ > [!IMPORTANT] -> Tabular Editor CLI 目前为 **有限公开预览版**。 可使用 Tabular Editor 账户进行评估;预览期间无需许可证。 在正式发布之前,命令、标志位和输出都可能会发生变化。 **该预览版本将在 2026-09-30 后停止运行。** 我们不建议在预览期间将该 CLI 用于生产环境的 CI/CD 流水线。 请查看我们的许可协议。 +> Tabular Editor CLI 目前为 **有限公开预览版**。 可使用 Tabular Editor 账户进行评估;预览期间无需许可证。 在正式发布之前,命令、标志位和输出都可能会发生变化。 **该预览版本将在 2026-09-30 后停止运行。** 我们不建议在预览期间将该 CLI 用于生产环境的 CI/CD 流水线。 From f756a102591e2d6820e47337d374caeeb5ffb116 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:40 +0200 Subject: [PATCH 36/49] New translations te-cli-automation.md (Chinese Simplified) [ci skip] --- .../features/te-cli/te-cli-automation.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-automation.md b/localizedContent/zh/content/features/te-cli/te-cli-automation.md index 0497af602..988849fac 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-automation.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-automation.md @@ -28,11 +28,11 @@ Tabular Editor CLI 具备可组合性;每个命令都支持结构化输出, | `text`(默认) | 人工阅读 | 无论是连接到 TTY 还是通过管道传输,stdout 都输出纯文本。 | | `json` | 机器可读 | 始终向 stdout 输出有效的 JSON。 如果还需要在 stderr 上输出机器可读的错误信息,请使用 `--error-format json`。 | | `csv` | 表格结果(`query`、`bpa run`、`bpa rules`、`vertipaq`、`validate`、`test`、`refresh`、`profile list`、`session list`、`find`、`replace`、`get`、`ls`) | 采用 RFC 4180 转义。 | -| `tmsl`(别名 `bim`) | 整个对象的 TMSL/BIM 序列化 | `te get` 和 `te ls` 接受此格式。 | +| `tmsl`(别名 `bim`) | 整个对象的 TMSL/BIM 序列化 | Accepted by `te get` and `te list`. | | `tmdl` | 整个对象的 TMDL 序列化 | 仅 `te get` 支持(单个对象)。 | ```bash -te ls --output-format json +te list --output-format json te query -q "EVALUATE VALUES('Date'[Year])" --output-format csv te bpa run --output-format json ``` @@ -52,11 +52,11 @@ te deploy ./model --non-interactive --force --ci github 每个 `te` 命令都会使用可预测的状态代码退出,因此调用方无需解析 stdout,就能根据成功或失败执行分支逻辑。 -| 退出代码 | 含义 | -| ---- | ---------------------------------------------------------------------------------------------- | -| `0` | 成功。 | -| `1` | 通用失败:参数无效、命令失败、验证错误、身份验证失败,或 BPA 门禁在严重级别 ≥ error 时未通过。 针对 `te diff`:发现差异(遵循 `diff`/`cmp` 的惯例)。 | -| `2` | 仅适用于 `te diff`:比较过程中出错,因此差异状态未知。 | +| 退出代码 | 含义 | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `0` | 成功。 | +| `1` | Generic failure - invalid arguments, command failed, validation errors, auth failure, BPA gate failed at severity >= error. 针对 `te diff`:发现差异(遵循 `diff`/`cmp` 的惯例)。 | +| `2` | 仅适用于 `te diff`:比较过程中出错,因此差异状态未知。 | 将退出代码与 `--ci ` 注释以及 `--trx ` 结合使用,可在 CI 中展示更丰富的失败信息——请参阅 @te-cli-cicd。 @@ -65,7 +65,7 @@ te deploy ./model --non-interactive --force --ci github 错误、警告和预览横幅会写入 **stderr**;结构化数据会写入 **stdout**。 这意味着你可以安全地通过管道传递 JSON,而不用担心其中混入进度指示或诊断信息: ```bash -te ls --output-format json | jq '.[] | .name' +te list --output-format json | jq '.[] | .name' te vertipaq --output-format json > stats.json ``` @@ -152,7 +152,7 @@ te deploy ./model ` ```bash # Count measures per table -te ls --type measure --output-format json \ +te list --type measure --output-format json \ | jq -r '.[] | .table' \ | sort | uniq -c | sort -rn ``` @@ -179,10 +179,10 @@ cat refresh.tmsl 下面这些小技巧,是在脚本或管道中组合 `te` 命令时经常会用到的: -- **幂等的创建与删除。** `te add Sales/Marker -t Measure -i "0" --if-not-exists --save` 用于创建度量值,`te rm Sales/OldMeasure --if-exists --save` 用于删除度量值;无论对象是否存在,两者都会以 `0` 退出——可在 CI 中安全地重复运行。 +- **Idempotent creates and removes.** `te add Sales/Marker -t Measure -i "0" --if-not-exists --save` and `te remove Sales/OldMeasure --if-exists --save` both exit `0` whether or not the object existed - safe to re-run in CI. - **试运行查看差异。** `te replace` 默认会先试运行;只有在你对预览结果满意时才添加 `--save`。 - **输出供审查的 TMSL。** `te deploy ./model --xmla deploy.tmsl` 会生成部署脚本,而不会更改服务器——适合 DBA 审查或手动应用。 -- **仅输出路径。** `te ls --paths-only` 和 `te find --paths-only` 每行输出一个对象路径,非常适合通过管道传给 `xargs`、`te get` 或 `te set`。 模型级容器(`te ls Measures`、`te ls Columns`)与此配合良好,适合对整个模型进行一次全面扫描。 +- **Path-only output.** `te list --paths-only` and `te find --paths-only` emit one object path per line, ideal for piping to `xargs`, `te get`, or `te set`. The model-level containers (`te list Measures`, `te list Columns`) compose well with this for whole-model sweeps. - **查询基准测试。** `te query --trace --cold --runs 5` 会在冷缓存下运行 DAX 查询,迭代五次,并捕获 FE/SE 跟踪事件。 - **CI 日志中的步骤耗时。** 长时间运行的命令(`te deploy`、`te refresh`、`te script`、`te validate`)会在 JSON 输出中包含 `durationMs` 字段——便于在管道摘要中展示各步骤耗时。 From 028fe3bca54e33489d9d757d785a1d518abe7ef1 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:43 +0200 Subject: [PATCH 37/49] New translations te-cli-cicd.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/features/te-cli/te-cli-cicd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-cicd.md b/localizedContent/zh/content/features/te-cli/te-cli-cicd.md index f78df6d02..47cf75136 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-cicd.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-cicd.md @@ -167,7 +167,7 @@ steps: 默认情况下,`te deploy` 和 `te save` 会先运行 Best Practice Analyzer 作为预检门禁。 有三种行为值得提前确定: -- **强制执行**——默认行为。 如果 BPA 发现严重级别 ≥ error 的违规项,管道将失败。 如果你也希望警告导致失败,可在独立的 `te bpa run` 步骤中配合 `--fail-on warning` 使用。 +- **强制执行**——默认行为。 Pipeline fails if BPA finds violations at severity >= error. 如果你也希望警告导致失败,可在独立的 `te bpa run` 步骤中配合 `--fail-on warning` 使用。 - **自动修复**——`--fix-bpa` 会在内存中对部署产物应用 `fixExpression`。 不会修改源文件。 当模型是唯一可信来源,而你希望部署在无需开发者干预的情况下规范化样式时,这很有用。 - **绕过**——`--skip-bpa` 会为单个命令禁用该门禁。 适合紧急热修复;不建议作为默认做法。 From 78baea752ae79ab328c4b4572ffde957c14cdf3e Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:46 +0200 Subject: [PATCH 38/49] New translations te-cli-install.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/features/te-cli/te-cli-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-install.md b/localizedContent/zh/content/features/te-cli/te-cli-install.md index 896b9e6bc..680c95218 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-install.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-install.md @@ -132,7 +132,7 @@ te config set hidePreviewNotice true ## Shell 自动补全 -CLI 提供适用于 **Bash**、**Zsh**、**PowerShell** 和 **Fish** 的 Tab 自动补全脚本。 选择与你使用的 shell 对应的代码块——每个代码块都会将自动补全设置为持久生效,在新的 shell 会话中也能使用。 +CLI 提供适用于 **Bash**、**Zsh**、**PowerShell** 和 **Fish** 的 Tab 自动补全脚本。 Pick the block that matches your shell - each one installs the completion persistently for new shell sessions. ### Bash(macOS/Linux) From 725495eac8b88dd1a7ddc857dfbd41ac3720bc1d Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:49 +0200 Subject: [PATCH 39/49] New translations te-cli-interactive.md (Chinese Simplified) [ci skip] --- .../features/te-cli/te-cli-interactive.md | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-interactive.md b/localizedContent/zh/content/features/te-cli/te-cli-interactive.md index 1510e5943..1526c2c6c 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-interactive.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-interactive.md @@ -2,7 +2,7 @@ uid: te-cli-interactive title: 交互模式 author: Peer Grønnerup -updated: 2026-05-12 +updated: 2026-06-26 applies_to: products: - product: Tabular Editor 2 @@ -29,6 +29,13 @@ te interactive ./model # Start with a local model te interactive -s MyWorkspace -d MyModel # Start with a remote model ``` +`te interactive` accepts a few flags for tuning the session: + +- `--no-banner` - skip the welcome banner on startup. +- `--echo` - echo each executed command to stdout before its output. Useful for logging when driving the REPL from a script. +- `--batch` - non-interactive batch mode: read commands from stdin line by line, execute each, and exit on EOF. Automatically enabled when stdin is redirected. +- `--no-batch` - force interactive TTY mode even when stdin is redirected (mutually exclusive with `--batch`). + 会话会打印欢迎横幅,显示当前活动模型,并将你带到一个具备模型上下文的提示符下: ![Tabular Editor CLI 交互模式会话](~/content/assets/images/features/cli/cli-interactive-mode.png) @@ -84,6 +91,64 @@ ls 'Net Sales'/'Sales Amount' # Quoted segments with a slash separator 如果想在当前会话中为单个命令禁用提示,传入 `--non-interactive`。 +## Piped and redirected input + +Interactive mode also accepts piped or redirected stdin, so the same REPL can be driven from a script instead of typed by hand. Each line of input is run as a command, exactly as if you had entered it at the prompt, and the session exits when input is exhausted (or when it reaches an `exit` line). + +```bash +printf "ls\nexit\n" | te interactive ./model # bash / git-bash +te interactive ./model < script.te # redirected file +``` + +```bat +(echo ls & echo exit) | te interactive .\model :: Windows cmd.exe +``` + +Lines that start with `#` are treated as comments and skipped, so you can annotate a script file: + +``` +# script.te - inspect the model, then exit +ls tables +ls measures +exit +``` + +### Batch mode and exit codes + +When stdin is piped, `--batch` is the **default**: the session stops at the first command that fails and exits with a non-zero code, which makes a piped run safe to use as a build or CI step. Pass `--no-batch` to keep running the remaining lines even after a command fails. The process exit code is `0` for a clean run and non-zero when a command fails under batch mode. + +```bash +# Default when piped: stop at the first failing command, exit non-zero +printf "bpa run --fail-on error\ndeploy --force\nexit\n" | te interactive ./model + +# Run every line regardless of failures +printf "bpa run --fail-on error\ndeploy --force\nexit\n" | te interactive ./model --no-batch +``` + +### Readable transcripts + +`--echo` writes each input line to stdout ahead of its output, which is handy when capturing a transcript of a piped run. Comment lines are not echoed. + +```bash +printf "ls tables\nexit\n" | te interactive ./model --echo +``` + +### Options + +| 选项 | 说明 | +| ------------- | ------------------------------------------------------------------------------------------------------------ | +| `--no-banner` | Suppress the welcome banner. | +| `--echo` | Echo each input line to stdout (useful for piped transcripts). | +| `--batch` | Exit non-zero on the first failing command (default when stdin is piped). | +| `--no-batch` | Continue after errors even when stdin is piped. | + +### Welcome banner vs. preview notice + +Two separate messages can appear at the start of a session - don't conflate them: + +- The **welcome banner** is the interactive splash described under [Starting a session](#starting-a-session). It is suppressed with `--no-banner`. When stdin is piped, no welcome banner is emitted in the first place, so `--no-banner` has a visible effect only in a true interactive (TTY) session. +- The **preview-expiry notice** (`This is an early preview release ...`) is a different message. It is always written to **stderr** and is **not** affected by `--no-banner`. Suppress it with `te config set hidePreviewNotice true`. + ## 何时使用交互模式与非交互模式 - **交互模式** 最适合探索、学习 CLI、针对单个模型执行一次性批量编辑,以及演示。 From 566ea7d4066e7ac7acb1511365ea049221d9435d Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:52 +0200 Subject: [PATCH 40/49] New translations te-cli-migrate.md (Chinese Simplified) [ci skip] --- .../content/features/te-cli/te-cli-migrate.md | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-migrate.md b/localizedContent/zh/content/features/te-cli/te-cli-migrate.md index 939e1e9e5..766fe399c 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-migrate.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-migrate.md @@ -55,34 +55,34 @@ te migrate --output-format json # Machine-readable mapping 以下是最常用标志的简要汇总,并非完整列表。 运行 `te migrate` 查看完整列表。 -| TE2 标志 | 新 CLI 等效参数 | 说明 | -| ----------------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `file`(位置参数) | `te ` 或使用全局参数 `--model` | 在大多数命令中,这是第一个位置参数。 | -| `server`、`database` | `te connect ` 或 `te deploy ` | Server 参数不再是全局位置参数。 | -| `-L` / `-LOCAL` | `te connect --local` | 仅限 Windows。 | -| `-S` / `-SCRIPT` | `te script -S ` 或 `-e "code"` | 支持多个脚本、内联代码和 stdin。 注意:请使用大写 `-S`;小写 `-s` 是全局 `--server` 选项。 | -| `-A` / `-ANALYZE` | `te bpa run --rules ` | 支持 `--fail-on`、`--fix` 和多个规则文件。 | -| `-AX` / `-ANALYZEX` | `te bpa run --rules `(不带 `--model-rules`) | 现在默认会排除嵌入模型的规则。 | -| `-B` / `-BIM` | `te save -o --serialization bim` | | -| `-F` / `-FOLDER` | `te save -o --serialization te-folder` | 在 `-D` 之后,TE2 的 `-F` 表示 `-FULL`;参见 `--deploy-full`。 | -| `-TMDL` | `te save -o --serialization tmdl` | TMDL 是默认保存格式。 | -| `-D` / `-DEPLOY` | `te deploy ` | 这是一个独立的命令,使用具名选项。 | -| `-O` / `-OVERWRITE` | (默认)或使用 `--create-only` 选择不覆盖 | 在新的 CLI 中,覆盖是默认行为。 | -| `-C` / `-CONNECTIONS` | `te deploy --deploy-connections` | | -| `-P` / `-PARTITIONS` 分区 | `te deploy --deploy-partitions` 部署分区 | | -| `-Y` / `-SKIPPOLICY` | `te deploy --deploy-partitions --skip-refresh-policy` 部署分区并跳过刷新策略 | 需要 `--deploy-partitions`。 | -| `-SHARED` | `te deploy --deploy-shared-expressions` | 在 `-D` 之后,TE2 的 `-S` 表示 `-SHARED`。 | -| `-R` / `-ROLES` 角色 | `te deploy --deploy-roles` | | -| `-M` / `-MEMBERS` | `te deploy --deploy-role-members` | | -| `-FULL`(在 `-D` 之后) | `te deploy --deploy-full` | 等同于:覆盖 + 连接 + 分区 + 共享 + 角色 + 角色成员。 | -| `-X` / `-XMLA ` | `te deploy ... --xmla ` | 输出到 stdout 时使用 `-`。 | -| `-V` / `-VSTS` | 在 `validate`、`bpa run` 和 `deploy` 命令中使用 `--ci vsts` | 会向 stderr 输出 `##vso[...]` 注释。 | -| `-G` / `-GITHUB` | `--ci github` | 会输出 `::error::` / `::warning::` 注释。 | -| `-T` / `-TRX ` | 在 `validate`、`bpa run` 和 `test run` 命令中使用 `--trx ` | 用于 Azure DevOps 测试发布的 VSTEST `.trx` 文件。 | -| `-W` / `-WARN` | (默认) | 部署结果中始终会 Report 警告。 | -| `-E` / `-ERR` | (默认) | 出现 DAX 错误时,部署会返回非零退出代码。 | -| `-SC` / `-SCHEMACHECK` | _尚未实现。_ | TE2 架构检查会连接到真实的数据源。 这不同于 `te validate`(DAX 语义验证,不连接数据源)。 | -| `-L` / `-LOGIN `(位于 `-D` 之后) | `te auth login -u -p -t ` | 使用服务主体或基于环境变量的凭据。 登录状态会被缓存,因此后续命令会静默获取令牌——见 @te-cli-auth。 | +| TE2 标志 | 新 CLI 等效参数 | 说明 | +| ----------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `file`(位置参数) | `te ` 或使用全局参数 `--model` | 在大多数命令中,这是第一个位置参数。 | +| `server`、`database` | `te connect ` or `te deploy -s -d ` | Server is no longer a global positional; `te deploy` takes only `` positionally, with server and database as named flags. | +| `-L` / `-LOCAL` | `te connect --local` | 仅限 Windows。 | +| `-S` / `-SCRIPT` | `te script -S ` 或 `-e "code"` | 支持多个脚本、内联代码和 stdin。 注意:请使用大写 `-S`;小写 `-s` 是全局 `--server` 选项。 | +| `-A` / `-ANALYZE` | `te bpa run --rules ` | 支持 `--fail-on`、`--fix` 和多个规则文件。 | +| `-AX` / `-ANALYZEX` | `te bpa run --rules `(不带 `--model-rules`) | 现在默认会排除嵌入模型的规则。 | +| `-B` / `-BIM` | `te save -o --serialization bim` | | +| `-F` / `-FOLDER` | `te save -o --serialization database.json` | 在 `-D` 之后,TE2 的 `-F` 表示 `-FULL`;参见 `--deploy-full`。 | +| `-TMDL` | `te save -o --serialization tmdl` | TMDL 是默认保存格式。 | +| `-D` / `-DEPLOY` | `te deploy -s -d ` | Separate command with named options; only `` is positional. | +| `-O` / `-OVERWRITE` | (默认)或使用 `--create-only` 选择不覆盖 | 在新的 CLI 中,覆盖是默认行为。 | +| `-C` / `-CONNECTIONS` | `te deploy --deploy-connections` | | +| `-P` / `-PARTITIONS` 分区 | `te deploy --deploy-partitions` 部署分区 | | +| `-Y` / `-SKIPPOLICY` | `te deploy --deploy-partitions --skip-refresh-policy` 部署分区并跳过刷新策略 | 需要 `--deploy-partitions`。 | +| `-SHARED` | `te deploy --deploy-shared-expressions` | 在 `-D` 之后,TE2 的 `-S` 表示 `-SHARED`。 | +| `-R` / `-ROLES` 角色 | `te deploy --deploy-roles` | | +| `-M` / `-MEMBERS` | `te deploy --deploy-role-members` | | +| `-FULL`(在 `-D` 之后) | `te deploy --deploy-full` | 等同于:覆盖 + 连接 + 分区 + 共享 + 角色 + 角色成员。 | +| `-X` / `-XMLA ` | `te deploy ... --xmla ` | 输出到 stdout 时使用 `-`。 | +| `-V` / `-VSTS` | 在 `validate`、`bpa run` 和 `deploy` 命令中使用 `--ci vsts` | 会向 stderr 输出 `##vso[...]` 注释。 | +| `-G` / `-GITHUB` | `--ci github` | 会输出 `::error::` / `::warning::` 注释。 | +| `-T` / `-TRX ` | 在 `validate`、`bpa run` 和 `test run` 命令中使用 `--trx ` | 用于 Azure DevOps 测试发布的 VSTEST `.trx` 文件。 | +| `-W` / `-WARN` | (默认) | 部署结果中始终会 Report 警告。 | +| `-E` / `-ERR` | (默认) | 出现 DAX 错误时,部署会返回非零退出代码。 | +| `-SC` / `-SCHEMACHECK` | _尚未实现。_ | TE2 架构检查会连接到真实的数据源。 这不同于 `te validate`(DAX 语义验证,不连接数据源)。 | +| `-L` / `-LOGIN `(位于 `-D` 之后) | `te auth login -u -p -t ` | 使用服务主体或基于环境变量的凭据。 登录状态会被缓存,因此后续命令会静默获取令牌——见 @te-cli-auth。 | ## 迁移指南 From 988e24de3193f6edcc63eb7b91d8e015063ffa6c Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 06:18:54 +0200 Subject: [PATCH 41/49] New translations te-cli.md (Chinese Simplified) [ci skip] --- .../zh/content/features/te-cli/te-cli.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli.md b/localizedContent/zh/content/features/te-cli/te-cli.md index e7fbceae3..53be02e77 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli.md +++ b/localizedContent/zh/content/features/te-cli/te-cli.md @@ -27,9 +27,9 @@ Tabular Editor CLI (`te`) 是适用于 Power BI 和 Analysis Services 语义模 每个命令都围绕三大设计支柱构建: -- **结构化输出** — 除默认的可读文本外,还支持 JSON、CSV、TMDL 和 TMSL。 -- **非交互模式** — 全局 `--non-interactive` 标志可禁用提示并快速失败。 -- **清晰的错误信息** — 写入 stderr,并使用可预测的退出代码。 +- **Structured output** - JSON, CSV, TMDL, TMSL alongside default human-readable text. +- **Non-interactive mode** - a global `--non-interactive` flag that disables prompts and fails fast. +- **Clear errors** - written to stderr with predictable exit codes. 这三者结合起来,让同一个二进制文件能够很好地服务于三类截然不同的用户: @@ -49,14 +49,14 @@ CLI 将 50 多个命令划分为 10 个类别。 每个命令族都对应语义 | 命令族 | 功能 | 示例命令 | | ------------------------------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [模型 I/O](xref:te-cli-commands#model-io) | 加载、保存、转换和初始化模型 | [`te load`](xref:te-cli-commands#load)、[`te save`](xref:te-cli-commands#save)、[`te init`](xref:te-cli-commands#init) | -| [模型编辑](xref:te-cli-commands#model-editing) | 获取/设置属性,添加/删除/移动对象 | [`te set`](xref:te-cli-commands#set)、[`te add`](xref:te-cli-commands#add)、[`te rm`](xref:te-cli-commands#rm)、[`te mv`](xref:te-cli-commands#mv) | -| [检视](xref:te-cli-commands#inspection) | 列出对象、搜索、比较差异、分析依赖关系 | [`te ls`](xref:te-cli-commands#ls)、[`te find`](xref:te-cli-commands#find)、[`te diff`](xref:te-cli-commands#diff)、[`te deps`](xref:te-cli-commands#deps) | +| [模型编辑](xref:te-cli-commands#model-editing) | 获取/设置属性,添加/删除/移动对象 | [`te set`](xref:te-cli-commands#set), [`te add`](xref:te-cli-commands#add), [`te remove`](xref:te-cli-commands#remove), [`te move`](xref:te-cli-commands#move) | +| [检视](xref:te-cli-commands#inspection) | 列出对象、搜索、比较差异、分析依赖关系 | [`te list`](xref:te-cli-commands#list), [`te find`](xref:te-cli-commands#find), [`te diff`](xref:te-cli-commands#diff), [`te deps`](xref:te-cli-commands#deps) | | [分析与质量](xref:te-cli-commands#analysis-and-quality) | 验证、运行 BPA、格式化 DAX、分析存储 | [`te validate`](xref:te-cli-commands#validate)、[`te bpa run`](xref:te-cli-commands#bpa-run)、[`te format`](xref:te-cli-commands#format)、[`te vertipaq`](xref:te-cli-commands#vertipaq) | | [执行](xref:te-cli-commands#execution) | 运行 DAX 查询、C# Script 和宏 | [`te query`](xref:te-cli-commands#query), [`te script`](xref:te-cli-commands#script), [`te 宏`](xref:te-cli-commands#macro) | | [部署与刷新](xref:te-cli-commands#deployment-and-refresh) | 部署到 Workspace、触发刷新、执行增量刷新 | [`te deploy`](xref:te-cli-commands#deploy)、[`te refresh`](xref:te-cli-commands#refresh)、[`te incremental-refresh`](xref:te-cli-commands#incremental-refresh) | | [测试](xref:te-cli-commands#testing) | 断言测试、快照、A/B 比较 | [`te test run`](xref:te-cli-commands#test-run) | | [连接与身份验证](xref:te-cli-commands#connection-and-authentication) | 连接到 Workspace,管理身份验证和配置文件 | [`te connect`](xref:te-cli-commands#connect), [`te auth`](xref:te-cli-commands#auth-login--status--logout), [`te profile`](xref:te-cli-commands#profile-list--show--set--remove) | -| [配置](xref:te-cli-commands#configuration) | 设置与许可 | [`te config`](xref:te-cli-commands#config-show--paths--init--set) | +| [配置](xref:te-cli-commands#configuration) | 设置与许可 | [`te config`](xref:te-cli-commands#config-list--paths--init--set) | | [Shell](xref:te-cli-commands#shell) | 交互模式、会话状态、Shell 自动补全 | [`te interactive`](xref:te-cli-commands#interactive), [`te session`](xref:te-cli-commands#session), [`te completion`](xref:te-cli-commands#completion) | ## 开始使用 @@ -70,10 +70,10 @@ CLI 将 50 多个命令划分为 10 个类别。 每个命令族都对应语义 ```bash te auth login -te ls -s MyWorkspace -d MyModel +te list -s MyWorkspace -d MyModel ``` -![Tabular Editor CLI te ls 示例输出](~/content/assets/images/features/cli/cli-command-ls.png) +![Tabular Editor CLI te list example output](~/content/assets/images/features/cli/cli-command-ls.png) ## 预览提示 From 1108900bf4358e6d0a4a6dcc3247a626135b8fc9 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:05 +0200 Subject: [PATCH 42/49] New translations te-cli-commands.md (Spanish) [ci skip] --- .../features/te-cli/te-cli-commands.md | 45 ++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-commands.md b/localizedContent/es/content/features/te-cli/te-cli-commands.md index 405ab3645..bf0da0533 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-commands.md +++ b/localizedContent/es/content/features/te-cli/te-cli-commands.md @@ -118,6 +118,26 @@ El sufijo entre corchetes de DAX se rechaza en las rutas de filtro; pon entre co Los segmentos mal escritos generan un error contextual con una sugerencia de "quizás quisiste decir" cuando la CLI puede deducir lo que querías decir. Las rutas a las que les falta el elemento padre fallan antes de la comprobación del elemento hoja, así que los mensajes señalan el segmento que realmente está mal. Empty containers (e.g., `te list Hierarchies` on a model without hierarchies) emit a simply "nothing here" hint rather than an error. +## Command aliases + +Most long-form verbs also accept a short alias. Each row shows the canonical command and the equivalent short-form command it accepts as an alias. + +| Canonical | Aliased form(s) | +| ------------------------------- | ---------------------------------- | +| `te list` | `te ls` | +| `te remove` | `te rm` | +| `te move` | `te mv`, `te rename` | +| `te bpa rules list` | `te bpa rules ls` | +| `te bpa rules remove` | `te bpa rules rm` | +| `te config list` | `te config ls` | +| `te macro list` | `te macro ls` | +| `te macro remove` | `te macro rm` | +| `te incremental-refresh remove` | `te incremental-refresh rm` | +| `te profile list` | `te profile ls` | +| `te profile remove` | `te profile rm` | +| `te session list` | `te session ls` | +| `te test list` | `te test ls` | + ## Opciones globales Estas opciones están disponibles en todos los comandos y se pueden usar antes o después del nombre del subcomando. @@ -531,7 +551,7 @@ Subcomandos: | [`enable`](#bpa-rules-enable) | Vuelve a activar una regla de BPA integrada que se había desactivado antes. | | `ignore [model]` | Agrega una regla a la lista de ignorados del modelo. | | [`init`](#bpa-rules-init) | Crea un archivo vacío de reglas de BPA en la ruta PATH resuelta. | -| [`list`](#bpa-rules-list) | Enumera las reglas de BPA de todos los orígenes con su estado. | +| [`list`](#bpa-rules-list) (alias `ls`) | Enumera las reglas de BPA de todos los orígenes con su estado. | | `remove [model]` (alias `rm`) | Elimina una regla de BPA. | | `set [model]` | Actualiza las propiedades de una regla del BPA. | | `unignore [model]` | Elimina una regla de la lista de reglas ignoradas del modelo. | @@ -551,7 +571,7 @@ Todos los subcomandos de `te bpa rules` aceptan: #### bpa rules list -Muestra las reglas de todos los orígenes (integradas, de usuario y del modelo). +Muestra las reglas de todos los orígenes (integradas, de usuario y del modelo). (Alias: `ls`.) `te bpa rules list` acepta: @@ -758,7 +778,7 @@ Subcomandos: | Subcomando | Propósito | | ----------------------------------------------------- | --------------------------------------------------------------------- | -| `list` | Listar macros. | +| `list` (alias `ls`) | Listar macros. | | [`run `](#macro-run) | Ejecutar una macro. | | `add ` | Agregar una macro. | | `set ` | Actualizar las propiedades de la macro. | @@ -898,6 +918,8 @@ te test run --tag revenue ### test init / spec / use / list / snapshot / compare +`te test list` also accepts the `ls` alias. + Los subcomandos adicionales permiten crear la estructura de las pruebas, imprimir el formato de la especificación de aserciones, cambiar la suite activa, listar las suites, capturar instantáneas y comparar modelos. Consulta `te test --help` para más detalles. ```bash @@ -946,7 +968,7 @@ Administra la autenticación almacenada en caché. Consulta @te-cli-auth. ### profile list / show / set / remove -Administra perfiles de conexión con nombre. Consulta @te-cli-auth. +Administra perfiles de conexión con nombre. (`te profile list` alias: `ls`; `te profile remove` alias: `rm`.) Consulta @te-cli-auth. ## Configuración @@ -977,6 +999,9 @@ te migrate --output-format json # Machine-readable mapping Inicia una sesión REPL guiada con un prompt adaptado al modelo. Consulta @te-cli-interactive. +> [!TIP] +> Running `te` in a terminal with no arguments also drops you into the REPL by default (as if you ran `te interactive`). Controlled by the `launchInteractiveMode` config key - see @te-cli-interactive#auto-launch-on-empty-invocation. + `te interactive` accepts: - `` - optional positional argument: start the session with a local model, `.bim` file, or `.SemanticModel` folder loaded. @@ -1000,12 +1025,12 @@ Muestra o administra la sesión actual del terminal. La CLI guarda el estado de Subcomandos: -| Subcomando | Propósito | -| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `show` | Muestra los detalles de la sesión actual (ID, ruta de archivo, estado activo). Es la opción predeterminada cuando no se proporciona ningún subcomando. | -| `list` | Lista todos los archivos de sesión. | -| `clear` | Borra el estado activo de la sesión actual. | -| `prune` | Elimina los archivos de sesión cuyo proceso de shell ya no está en ejecución. | +| Subcomando | Propósito | +| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `show` | Muestra los detalles de la sesión actual (ID, ruta de archivo, estado activo). Es la opción predeterminada cuando no se proporciona ningún subcomando. | +| `list` (alias `ls`) | Lista todos los archivos de sesión. | +| `clear` | Borra el estado activo de la sesión actual. | +| `prune` | Elimina los archivos de sesión cuyo proceso de shell ya no está en ejecución. | `te session prune` acepta: From f7d6aaceeca54e45a6391f2e372fcbfe5cb0d321 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:08 +0200 Subject: [PATCH 43/49] New translations te-cli-config.md (Spanish) [ci skip] --- .../content/features/te-cli/te-cli-config.md | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli-config.md b/localizedContent/es/content/features/te-cli/te-cli-config.md index 9a33b250f..33584b7b0 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-config.md +++ b/localizedContent/es/content/features/te-cli/te-cli-config.md @@ -95,6 +95,7 @@ El esquema completo de configuración JSON con todas las claves en sus valores p }, "interactiveEditMode": "stage", + "launchInteractiveMode": "auto", "formatOptions": { "useSemicolons": false, @@ -142,18 +143,19 @@ Ejecuta `te config paths` para ver qué archivo resolvió realmente la CLI. Toda la configuración relacionada con BPA está en el objeto `bpa` y se referencia mediante claves con puntos en `te config set`. -| Clave | Predeterminado | Descripción | -| ---------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `autoFormat` | `false` | Run the DAX Formatter on modified expressions after `te add` / `te set` / `te move` / `te macro run`. Usa el formateador interno de forma predeterminada; puedes optar por el servicio web de SQL BI mediante `formatOptions.useSqlBiDaxFormatter`. | -| `validateOnMutation` | `true` | Después de un comando de modificación (`add`, `set`, `mv`, `replace --save`, `macro run`), comprueba que todas las referencias `Table[Column]` del modelo se sigan resolviendo. Detecta referencias huérfanas introducidas por cambios de nombre o eliminaciones antes de llegar al despliegue. | -| `bpa.onMutation` | `false` | Ejecuta un análisis de BPA acotado después de cada comando de modificación (`set`, `add`, `mv`, `rm`, `macro run`). Solo se comprueban los objetos de la tabla afectada, no los de todo el modelo; útil para obtener retroalimentación rápida durante ediciones iterativas. | -| `bpa.onDeploy` | `true` | Ejecuta el control de BPA antes de que se ejecute `te deploy`. The deploy is aborted if any rule fires at severity >= error. Omítelo en una invocación concreta con `--skip-bpa`, o corrígelo automáticamente con `--fix-bpa`. | -| `bpa.onSave` | `true` | Ejecuta el control de BPA antes de que `te save -o` escriba en disco. Omítelo en una invocación concreta con `--skip-bpa` o `--force`. | -| `bpa.builtInRules` | `true` | Incluye el conjunto depurado de reglas integradas de BPA cada vez que se ejecute el control. Configúralo en `false` para ignorar por completo las reglas integradas; entonces el control ejecutará solo las reglas configuradas mediante `bpa.rules` y cualquier regla incrustada en el modelo. | -| `bpa.disabledBuiltInRuleIds` | `null` | ID de reglas integradas individuales que se excluirán de la puerta de calidad. Este valor se modifica mediante `te bpa rules disable ` / `te bpa rules enable `; es preferible usar esos comandos en lugar de editar el arreglo directamente. | -| `vertipaqOnRefresh` | `false` | Tras una actualización correcta (`full`, `dataonly`, `automatic` o `add`), ejecuta automáticamente el análisis de VertiPaq para mostrar estadísticas de almacenamiento de las tablas actualizadas. Útil para detectar de inmediato regresiones inesperadas de cardinalidad o memoria. | -| `interactiveEditMode` | `stage` | Comportamiento predeterminado para las mutaciones en memoria dentro de `te interactive`. `stage` mantiene las mutaciones en memoria hasta que se invoca `save` (la opción más segura); `save` escribe en el origen después de cada comando que modifica el estado (úsese con cuidado en orígenes remotos: cada `set` desencadena una escritura XMLA); `revert` descarta las mutaciones después de cada comando, a menos que se haya pasado `--save` o `--stage`. Las marcas `--save` / `--revert` / `--stage` por comando siempre prevalecen. | -| `disableTelemetry` | `false` | Desactiva la telemetría de uso anónima. La CLI recopila datos básicos de uso de comandos (nombre del comando, código de salida y duración) para orientar la priorización de funciones. La CLI nunca recopila el contenido del modelo, PATH ni el texto de las consultas. | +| Clave | Predeterminado | Descripción | +| ---------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `autoFormat` | `false` | Run the DAX Formatter on modified expressions after `te add` / `te set` / `te move` / `te macro run`. Usa el formateador interno de forma predeterminada; puedes optar por el servicio web de SQL BI mediante `formatOptions.useSqlBiDaxFormatter`. | +| `validateOnMutation` | `true` | Después de un comando de modificación (`add`, `set`, `mv`, `replace --save`, `macro run`), comprueba que todas las referencias `Table[Column]` del modelo se sigan resolviendo. Detecta referencias huérfanas introducidas por cambios de nombre o eliminaciones antes de llegar al despliegue. | +| `bpa.onMutation` | `false` | Ejecuta un análisis de BPA acotado después de cada comando de modificación (`set`, `add`, `mv`, `rm`, `macro run`). Solo se comprueban los objetos de la tabla afectada, no los de todo el modelo; útil para obtener retroalimentación rápida durante ediciones iterativas. | +| `bpa.onDeploy` | `true` | Ejecuta el control de BPA antes de que se ejecute `te deploy`. The deploy is aborted if any rule fires at severity >= error. Omítelo en una invocación concreta con `--skip-bpa`, o corrígelo automáticamente con `--fix-bpa`. | +| `bpa.onSave` | `true` | Ejecuta el control de BPA antes de que `te save -o` escriba en disco. Omítelo en una invocación concreta con `--skip-bpa` o `--force`. | +| `bpa.builtInRules` | `true` | Incluye el conjunto depurado de reglas integradas de BPA cada vez que se ejecute el control. Configúralo en `false` para ignorar por completo las reglas integradas; entonces el control ejecutará solo las reglas configuradas mediante `bpa.rules` y cualquier regla incrustada en el modelo. | +| `bpa.disabledBuiltInRuleIds` | `null` | ID de reglas integradas individuales que se excluirán de la puerta de calidad. Este valor se modifica mediante `te bpa rules disable ` / `te bpa rules enable `; es preferible usar esos comandos en lugar de editar el arreglo directamente. | +| `vertipaqOnRefresh` | `false` | Tras una actualización correcta (`full`, `dataonly`, `automatic` o `add`), ejecuta automáticamente el análisis de VertiPaq para mostrar estadísticas de almacenamiento de las tablas actualizadas. Útil para detectar de inmediato regresiones inesperadas de cardinalidad o memoria. | +| `interactiveEditMode` | `stage` | Comportamiento predeterminado para las mutaciones en memoria dentro de `te interactive`. `stage` mantiene las mutaciones en memoria hasta que se invoca `save` (la opción más segura); `save` escribe en el origen después de cada comando que modifica el estado (úsese con cuidado en orígenes remotos: cada `set` desencadena una escritura XMLA); `revert` descarta las mutaciones después de cada comando, a menos que se haya pasado `--save` o `--stage`. Las marcas `--save` / `--revert` / `--stage` por comando siempre prevalecen. | +| `launchInteractiveMode` | `auto` | Whether running `te` in a terminal with no arguments launches the interactive REPL. `auto` (default) launches the REPL only when all three streams (stdin, stdout, stderr) are attached to a TTY, so scripts and CI pipelines fall through to normal parse. `always` launches the REPL regardless of redirection. `never` disables the auto-launch entirely, restoring the traditional help-on-empty behavior. The global `--non-interactive` flag forces `never` for a single invocation. Can also be set for one invocation via the `TE_INTERACTIVE` environment variable. | +| `disableTelemetry` | `false` | Desactiva la telemetría de uso anónima. La CLI recopila datos básicos de uso de comandos (nombre del comando, código de salida y duración) para orientar la priorización de funciones. La CLI nunca recopila el contenido del modelo, PATH ni el texto de las consultas. | ```bash te config set bpa.rules "/etc/te/team.json,/etc/te/strict.json" @@ -238,18 +240,19 @@ Deshabilita una comprobación con `te config set false`, o limita esa rela Usa las siguientes variables de entorno específicas de la CLI para PATH, comportamiento y diagnósticos. Para las variables de autenticación de Azure (`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_CERTIFICATE_PATH`, etc.), consulta @te-cli-auth. -| Variable | Propósito | -| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `TE_CONFIG` | Ruta de acceso a un archivo de configuración alternativo. Se respeta en todas las operaciones de `te config` (`show`, `set`, `init`, `paths`). | -| `TE_MACROS_PATH` | Anula la ruta del archivo de macros (segundo en el orden de resolución; ver arriba). La leen los comandos `te macro`. | -| `TE_BPA_RULES` | Anula la lista de archivos/URL de reglas de BPA utilizada por los subcomandos `te bpa run` y `te bpa rules`. | -| `TE_BPA_CONFIG` | Anula la ruta de acceso a la configuración del gate de BPA (`.te-bpa.json`) que lee el gate de despliegue/guardado. | -| `TE3_EXE_PATH` | Ruta al binario de escritorio de Tabular Editor 3. Se usa **solo** con `te open`; puedes dejarla sin definir en Linux/macOS o si no usas `te open`. Si no se especifica, se usa la búsqueda en `PATH`. | -| `TE_DEBUG` | Establece el valor en `1` para habilitar el registro de depuración globalmente (igual que `--debug` o `debug: true` en la configuración). | -| `NO_SPINNER` | Establece el valor en `1` o `true` para desactivar los indicadores de progreso animados (alternativa a `spinner: false` en la configuración). | -| `CI` | Se detecta automáticamente. Cuando vale `1` o `true`, la CLI desactiva el spinner y cambia a una salida de texto sin formato. La mayoría de los runners de CI lo configuran automáticamente. | -| `TE_SESSION` | Sobrescribe el identificador de sesión por terminal que se usa para el estado de la conexión activa. Útil para ejecutar varias sesiones aisladas de la CLI dentro del mismo shell, por ejemplo, en trabajos de matriz de CI en paralelo. Inspecciona y gestiona las sesiones con [`te session`](xref:te-cli-commands#session). | -| `TE_COMPAT` | Establécela en `te2` para forzar el modo de compatibilidad con TE2; consulta @te-cli-migrate. | +| Variable | Propósito | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `TE_CONFIG` | Ruta de acceso a un archivo de configuración alternativo. Se respeta en todas las operaciones de `te config` (`show`, `set`, `init`, `paths`). | +| `TE_MACROS_PATH` | Anula la ruta del archivo de macros (segundo en el orden de resolución; ver arriba). La leen los comandos `te macro`. | +| `TE_BPA_RULES` | Anula la lista de archivos/URL de reglas de BPA utilizada por los subcomandos `te bpa run` y `te bpa rules`. | +| `TE_BPA_CONFIG` | Anula la ruta de acceso a la configuración del gate de BPA (`.te-bpa.json`) que lee el gate de despliegue/guardado. | +| `TE3_EXE_PATH` | Ruta al binario de escritorio de Tabular Editor 3. Se usa **solo** con `te open`; puedes dejarla sin definir en Linux/macOS o si no usas `te open`. Si no se especifica, se usa la búsqueda en `PATH`. | +| `TE_DEBUG` | Establece el valor en `1` para habilitar el registro de depuración globalmente (igual que `--debug` o `debug: true` en la configuración). | +| `NO_SPINNER` | Establece el valor en `1` o `true` para desactivar los indicadores de progreso animados (alternativa a `spinner: false` en la configuración). | +| `CI` | Se detecta automáticamente. Cuando vale `1` o `true`, la CLI desactiva el spinner y cambia a una salida de texto sin formato. La mayoría de los runners de CI lo configuran automáticamente. | +| `TE_SESSION` | Sobrescribe el identificador de sesión por terminal que se usa para el estado de la conexión activa. Útil para ejecutar varias sesiones aisladas de la CLI dentro del mismo shell, por ejemplo, en trabajos de matriz de CI en paralelo. Inspecciona y gestiona las sesiones con [`te session`](xref:te-cli-commands#session). | +| `TE_INTERACTIVE` | Override `launchInteractiveMode` for a single invocation. Accepts `auto`, `always`, or `never`. Handy for one-off scripts that want the interactive REPL (`TE_INTERACTIVE=always`) or want to force the classic help-on-empty behavior (`TE_INTERACTIVE=never`) without touching the config file. | +| `TE_COMPAT` | Establécela en `te2` para forzar el modo de compatibilidad con TE2; consulta @te-cli-migrate. | ## Páginas relacionadas From aea2a340bb35a1d5fdd84d51a653a95ac8e0bc1f Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:11 +0200 Subject: [PATCH 44/49] New translations te-cli-interactive.md (Spanish) [ci skip] --- .../features/te-cli/te-cli-interactive.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/localizedContent/es/content/features/te-cli/te-cli-interactive.md b/localizedContent/es/content/features/te-cli/te-cli-interactive.md index d4477f96c..3d5de572c 100644 --- a/localizedContent/es/content/features/te-cli/te-cli-interactive.md +++ b/localizedContent/es/content/features/te-cli/te-cli-interactive.md @@ -149,6 +149,27 @@ Two separate messages can appear at the start of a session - don't conflate them - The **welcome banner** is the interactive splash described under [Starting a session](#starting-a-session). It is suppressed with `--no-banner`. When stdin is piped, no welcome banner is emitted in the first place, so `--no-banner` has a visible effect only in a true interactive (TTY) session. - The **preview-expiry notice** (`This is an early preview release ...`) is a different message. It is always written to **stderr** and is **not** affected by `--no-banner`. Suppress it with `te config set hidePreviewNotice true`. +## Auto-launch on empty invocation + +Running `te` in a terminal with no arguments drops you straight into the interactive REPL, so exploring a model is as fast as opening a shell and typing `te`. When stdin, stdout, or stderr is redirected (piped output, CI pipelines, scripts), the CLI falls through to its normal parse and prints help instead - so shell scripts that invoke `te` without a subcommand keep behaving the same way. + +The behavior is controlled by the `launchInteractiveMode` config key with three values: + +| Valor | Effect | +| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `auto` (default) | Launch the REPL only when all three streams are attached to a TTY. Otherwise fall through to normal parse. | +| `always` | Launch the REPL regardless of stream redirection. Useful when you always want an interactive session. | +| `never` | Never auto-launch the REPL. `te` on its own prints help, matching the pre-0.6.0 behavior. | + +Change it globally with: + +```bash +te config set launchInteractiveMode never # keep the classic help-on-empty behavior +te config set launchInteractiveMode auto # restore the default +``` + +Override for a single invocation via the `TE_INTERACTIVE` environment variable (same values), or pass `--non-interactive` on the command line - both force `never` for that call, so `te --non-interactive` prints help instead of launching the REPL. + ## Cuándo usar el modo interactivo frente al no interactivo - **El modo interactivo** es ideal para explorar, aprender la CLI, hacer ediciones masivas puntuales sobre un único modelo y realizar demos. From ef5ee8695bda9dd25ca65cb0230c646b36700ad9 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:14 +0200 Subject: [PATCH 45/49] New translations te-cli.md (Spanish) [ci skip] --- localizedContent/es/content/features/te-cli/te-cli.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/localizedContent/es/content/features/te-cli/te-cli.md b/localizedContent/es/content/features/te-cli/te-cli.md index fbb4f0910..053feb666 100644 --- a/localizedContent/es/content/features/te-cli/te-cli.md +++ b/localizedContent/es/content/features/te-cli/te-cli.md @@ -59,12 +59,15 @@ Consulta @te-cli-commands para ver una referencia completa de los comandos, con | [Configuración](xref:te-cli-commands#configuration) | Configuración y licencias | [`te config`](xref:te-cli-commands#config-list--paths--init--set) | | [Shell](xref:te-cli-commands#shell) | Modo interactivo, estado de la sesión, completado automático del shell | [`te interactive`](xref:te-cli-commands#interactive), [`te session`](xref:te-cli-commands#session), [`te completion`](xref:te-cli-commands#completion) | +> [!TIP] +> The docs use canonical long-form verbs (`list`, `remove`, `move`), but the classic short forms still work as aliases (`ls`, `rm`, `mv`, `rename`). This applies to top-level commands and to `remove` / `list` subcommands under groups like `te bpa rules`, `te macro`, `te config`, `te profile`, `te session`, and `te test`. See @te-cli-commands#command-aliases for the full mapping. + ## Primeros pasos 1. **Regístrate o inicia sesión** en [tabulareditor.com](https://tabulareditor.com/download-tabular-editor-cli) con una cuenta de Tabular Editor. 2. **Descarga e instala**: consulta @te-cli-install para ver las instrucciones para Windows, macOS y Linux. 3. **Autentícate**: ejecuta `te auth login` para conectarte a Power BI o Fabric. Consulta @te-cli-auth. -4. **Ejecuta tu primer comando**: `te --help` enumera todos los comandos; `te --help` muestra las opciones detalladas. +4. **Ejecuta tu primer comando**: `te --help` enumera todos los comandos; `te --help` muestra las opciones detalladas. Tip: running `te` on its own in a terminal drops you into the interactive REPL - a friendly way to explore a model. Consulta @te-cli-interactive. Para ver por primera vez un modelo en vivo, solo necesitas dos comandos: From ab7999fcf7f1b6e7d0b7f98715e09eeddf6bfca0 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:18 +0200 Subject: [PATCH 46/49] New translations te-cli-commands.md (Chinese Simplified) [ci skip] --- .../features/te-cli/te-cli-commands.md | 45 ++++++++++++++----- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-commands.md b/localizedContent/zh/content/features/te-cli/te-cli-commands.md index 3c3b85e90..845131e11 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-commands.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-commands.md @@ -118,6 +118,26 @@ te list 'Roles/Re*/Members' # Members of every role matching Re* 分段拼写错误时会给出一条与上下文相关的错误;如果 CLI 能猜到你的意图,还会附带“你是不是想输入……”的提示。 缺少父级的路径会在检查叶节点之前失败,因此信息会指向真正出错的分段。 Empty containers (e.g., `te list Hierarchies` on a model without hierarchies) emit a simply "nothing here" hint rather than an error. +## Command aliases + +Most long-form verbs also accept a short alias. Each row shows the canonical command and the equivalent short-form command it accepts as an alias. + +| Canonical | Aliased form(s) | +| ------------------------------- | ---------------------------------- | +| `te list` | `te ls` | +| `te remove` | `te rm` | +| `te move` | `te mv`, `te rename` | +| `te bpa rules list` | `te bpa rules ls` | +| `te bpa rules remove` | `te bpa rules rm` | +| `te config list` | `te config ls` | +| `te macro list` | `te macro ls` | +| `te macro remove` | `te macro rm` | +| `te incremental-refresh remove` | `te incremental-refresh rm` | +| `te profile list` | `te profile ls` | +| `te profile remove` | `te profile rm` | +| `te session list` | `te session ls` | +| `te test list` | `te test ls` | + ## 全局选项 这些标志适用于每个命令,可在子命令名称之前或之后使用。 @@ -531,7 +551,7 @@ Manage BPA rule collections - list, inspect, initialize, and toggle rules in you | [`enable`](#bpa-rules-enable) | 重新启用先前已禁用的内置 BPA 规则。 | | `ignore [model]` | 将规则添加到模型的忽略列表。 | | [`init`](#bpa-rules-init) | 在解析后的 PATH 下创建一个空的 BPA 规则文件。 | -| [`list`](#bpa-rules-list) | 列出来自所有来源的 BPA 规则及其状态。 | +| [`list`](#bpa-rules-list) (alias `ls`) | 列出来自所有来源的 BPA 规则及其状态。 | | `remove [model]` (alias `rm`) | 删除一条 BPA 规则。 | | `set [model]` | 更新 BPA 规则的属性。 | | `unignore [model]` | 从模型的忽略列表中移除一条规则。 | @@ -551,7 +571,7 @@ Manage BPA rule collections - list, inspect, initialize, and toggle rules in you #### bpa rules list -列出来自所有来源的规则(内置、用户、模型)。 +列出来自所有来源的规则(内置、用户、模型)。 (Alias: `ls`.) `te bpa rules list` 接受以下选项: @@ -758,7 +778,7 @@ echo "Info(Model.Name);" | te script -e - | 子命令 | 用途 | | ----------------------------------------------------- | ------------------- | -| `list` | 列出宏。 | +| `list` (alias `ls`) | 列出宏。 | | 宏:[`run `](#macro-run) | 运行宏。 | | `add ` | 添加宏。 | | `set ` | 更新宏属性。 | @@ -898,6 +918,8 @@ te test run --tag revenue ### test init / spec / use / list / snapshot / compare +`te test list` also accepts the `ls` alias. + 其他子命令可用于搭建测试脚手架、打印断言规范格式、切换当前活动套件、列出套件、捕获快照以及比较模型。 查看 `te test --help` 了解详情。 ```bash @@ -946,7 +968,7 @@ te connect ./revenue-model -w Finance "Revenue Model" # Mirror local → remo ### profile list / show / set / remove -管理命名连接配置文件。 参见 @te-cli-auth。 +管理命名连接配置文件。 (`te profile list` alias: `ls`; `te profile remove` alias: `rm`.) 参见 @te-cli-auth。 ## 配置 @@ -977,6 +999,9 @@ te migrate --output-format json # Machine-readable mapping 使用具备模型感知能力的提示词启动引导式 REPL 会话。 参见 @te-cli-interactive。 +> [!TIP] +> Running `te` in a terminal with no arguments also drops you into the REPL by default (as if you ran `te interactive`). Controlled by the `launchInteractiveMode` config key - see @te-cli-interactive#auto-launch-on-empty-invocation. + `te interactive` accepts: - `` - optional positional argument: start the session with a local model, `.bim` file, or `.SemanticModel` folder loaded. @@ -1000,12 +1025,12 @@ printf "list Measures\nexit\n" | te interactive ./model # Pipe commands via st 子命令: -| 子命令 | 用途 | -| ------- | ---------------------------------------- | -| `show` | 显示当前会话的详细信息(ID、文件路径、活动状态)。 未提供子命令时的默认行为。 | -| `list` | 列出所有会话文件。 | -| `clear` | 清除当前会话的活动状态。 | -| `prune` | 删除其 shell 进程已停止运行的会话文件。 | +| 子命令 | 用途 | +| -------------------------------------- | ---------------------------------------- | +| `show` | 显示当前会话的详细信息(ID、文件路径、活动状态)。 未提供子命令时的默认行为。 | +| `list` (alias `ls`) | 列出所有会话文件。 | +| `clear` | 清除当前会话的活动状态。 | +| `prune` | 删除其 shell 进程已停止运行的会话文件。 | `te session prune` 支持以下选项: From e8d44c06674d331af010b2c7aeb2924cb17dba97 Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:21 +0200 Subject: [PATCH 47/49] New translations te-cli-config.md (Chinese Simplified) [ci skip] --- .../content/features/te-cli/te-cli-config.md | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-config.md b/localizedContent/zh/content/features/te-cli/te-cli-config.md index 9b8e202fd..dbbf75fbb 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-config.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-config.md @@ -95,6 +95,7 @@ te config set macros null # Clear a path override }, "interactiveEditMode": "stage", + "launchInteractiveMode": "auto", "formatOptions": { "useSemicolons": false, @@ -142,18 +143,19 @@ CLI 不会自动检测 TE3 的任何安装位置——请显式配置这些项 所有与 BPA 相关的设置都位于 `bpa` 对象下,并可在 `te config set` 中使用点号分隔的键进行设置。 -| 键名 | 默认值 | 说明 | -| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `autoFormat` | `false` | Run the DAX Formatter on modified expressions after `te add` / `te set` / `te move` / `te macro run`. 默认使用内置格式化程序;可通过 `formatOptions.useSqlBiDaxFormatter` 改用 SQL BI Web 服务。 | -| `validateOnMutation` | `true` | 在执行更改命令(`add`、`set`、`mv`、`replace --save`、`macro run`)后,检查模型中的每个 `Table[Column]` 引用是否仍可解析。 可在部署前捕获因重命名或删除而引入的悬空引用。 | -| `bpa.onMutation` | `false` | 在每次更改命令(`set`、`add`、`mv`、`rm`、`macro run`)后,运行一次限定范围的 BPA 分析。 只检查受影响表中的对象,而不是整个模型——这对于迭代编辑时获得快速反馈很有用。 | -| `bpa.onDeploy` | `true` | 在执行 `te deploy` 之前运行 BPA 关卡检查。 The deploy is aborted if any rule fires at severity >= error. 可通过 `--skip-bpa` 在单次调用中跳过,或通过 `--fix-bpa` 自动修复。 | -| `bpa.onSave` | `true` | 在 `te save -o` 写入磁盘之前运行 BPA 关卡检查。 可通过 `--skip-bpa` 或 `--force` 在单次调用中跳过。 | -| `bpa.builtInRules` | `true` | 每次运行关卡检查时,都包含精选的内置 BPA 规则集。 设为 `false` 可完全忽略内置规则;此时关卡检查只运行通过 `bpa.rules` 配置的规则以及嵌入模型中的规则。 | -| `bpa.disabledBuiltInRuleIds` | `null` | 要从门禁中排除的各个内置规则的 ID。 可通过 `te bpa rules disable ` / `te bpa rules enable ` 修改——优先使用这些命令,而不是直接编辑该数组。 | -| `vertipaqOnRefresh` | `false` | 成功刷新后(`full`、`dataonly`、`automatic` 或 `add`),自动运行 VertiPaq 分析,以显示已刷新表的存储统计信息。 有助于立即发现意外的基数变化或内存回归。 | -| `interactiveEditMode` | `stage` | 在 `te interactive` 中对内存中变更的默认处理方式。 `stage` 会将变更保留在内存中,直到调用 `save`(最安全);`save` 会在每次产生变更的命令后写回源(对远程源请谨慎使用——每次 `set` 都会触发一次 XMLA 写入);`revert` 会在每条命令后丢弃变更,除非传入了 `--save` 或 `--stage`。 每个命令上的 `--save` / `--revert` / `--stage` 标志始终会覆盖此设置。 | -| `disableTelemetry` | `false` | 选择不参与匿名使用遥测数据收集。 CLI 会收集粗粒度的命令使用数据(命令名称、退出代码、持续时间),用于确定功能优先级。 CLI 绝不会收集模型内容、PATH 或查询文本。 | +| 键名 | 默认值 | 说明 | +| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `autoFormat` | `false` | Run the DAX Formatter on modified expressions after `te add` / `te set` / `te move` / `te macro run`. 默认使用内置格式化程序;可通过 `formatOptions.useSqlBiDaxFormatter` 改用 SQL BI Web 服务。 | +| `validateOnMutation` | `true` | 在执行更改命令(`add`、`set`、`mv`、`replace --save`、`macro run`)后,检查模型中的每个 `Table[Column]` 引用是否仍可解析。 可在部署前捕获因重命名或删除而引入的悬空引用。 | +| `bpa.onMutation` | `false` | 在每次更改命令(`set`、`add`、`mv`、`rm`、`macro run`)后,运行一次限定范围的 BPA 分析。 只检查受影响表中的对象,而不是整个模型——这对于迭代编辑时获得快速反馈很有用。 | +| `bpa.onDeploy` | `true` | 在执行 `te deploy` 之前运行 BPA 关卡检查。 The deploy is aborted if any rule fires at severity >= error. 可通过 `--skip-bpa` 在单次调用中跳过,或通过 `--fix-bpa` 自动修复。 | +| `bpa.onSave` | `true` | 在 `te save -o` 写入磁盘之前运行 BPA 关卡检查。 可通过 `--skip-bpa` 或 `--force` 在单次调用中跳过。 | +| `bpa.builtInRules` | `true` | 每次运行关卡检查时,都包含精选的内置 BPA 规则集。 设为 `false` 可完全忽略内置规则;此时关卡检查只运行通过 `bpa.rules` 配置的规则以及嵌入模型中的规则。 | +| `bpa.disabledBuiltInRuleIds` | `null` | 要从门禁中排除的各个内置规则的 ID。 可通过 `te bpa rules disable ` / `te bpa rules enable ` 修改——优先使用这些命令,而不是直接编辑该数组。 | +| `vertipaqOnRefresh` | `false` | 成功刷新后(`full`、`dataonly`、`automatic` 或 `add`),自动运行 VertiPaq 分析,以显示已刷新表的存储统计信息。 有助于立即发现意外的基数变化或内存回归。 | +| `interactiveEditMode` | `stage` | 在 `te interactive` 中对内存中变更的默认处理方式。 `stage` 会将变更保留在内存中,直到调用 `save`(最安全);`save` 会在每次产生变更的命令后写回源(对远程源请谨慎使用——每次 `set` 都会触发一次 XMLA 写入);`revert` 会在每条命令后丢弃变更,除非传入了 `--save` 或 `--stage`。 每个命令上的 `--save` / `--revert` / `--stage` 标志始终会覆盖此设置。 | +| `launchInteractiveMode` | `auto` | Whether running `te` in a terminal with no arguments launches the interactive REPL. `auto` (default) launches the REPL only when all three streams (stdin, stdout, stderr) are attached to a TTY, so scripts and CI pipelines fall through to normal parse. `always` launches the REPL regardless of redirection. `never` disables the auto-launch entirely, restoring the traditional help-on-empty behavior. The global `--non-interactive` flag forces `never` for a single invocation. Can also be set for one invocation via the `TE_INTERACTIVE` environment variable. | +| `disableTelemetry` | `false` | 选择不参与匿名使用遥测数据收集。 CLI 会收集粗粒度的命令使用数据(命令名称、退出代码、持续时间),用于确定功能优先级。 CLI 绝不会收集模型内容、PATH 或查询文本。 | ```bash te config set bpa.rules "/etc/te/team.json,/etc/te/strict.json" @@ -238,18 +240,19 @@ When you run a mutating command (`te add`, `te set`, `te move`, `te replace --sa 使用以下 CLI 专用环境变量来设置路径、行为和诊断。 有关 Azure 身份验证变量(`AZURE_CLIENT_ID`、`AZURE_TENANT_ID`、`AZURE_CLIENT_CERTIFICATE_PATH` 等),见 @te-cli-auth。 -| 变量 | 用途 | -| ---------------- | ------------------------------------------------------------------------------------------------------------------------------- | -| `TE_CONFIG` | 替代配置文件的路径。 所有 `te config` 操作(`show`、`set`、`init`、`paths`)都会遵循该变量的设置。 | -| `TE_MACROS_PATH` | 覆盖宏文件路径(在解析顺序中排第二,见上文)。 由 `te macro` 命令读取。 | -| `TE_BPA_RULES` | 覆盖 `te bpa run` 和 `te bpa rules` 子命令使用的 BPA 规则文件/URL 列表。 | -| `TE_BPA_CONFIG` | 覆盖 deploy/save 门禁读取的 BPA 门禁配置 (`.te-bpa.json`) 的路径。 | -| `TE3_EXE_PATH` | Tabular Editor 3 桌面版二进制文件的路径。 此项 **仅** 用于 `te open`;在 Linux/macOS 上或不使用 `te open` 时,可安全留空。 会回退到 `PATH` 查找。 | -| `TE_DEBUG` | 设为 `1` 可全局启用调试日志(等同于 `--debug` 或配置中的 `debug: true`)。 | -| `NO_SPINNER` | 设为 `1` 或 `true` 可禁用动画进度指示器(可替代配置中的 `spinner: false`)。 | -| `CI` | 自动检测。 当设为 `1` 或 `true` 时,CLI 会禁用动画进度指示器,并切换为纯文本输出。 大多数 CI 运行器都会自动设置此项。 | -| `TE_SESSION` | 覆盖用于活动连接状态的按终端划分的会话 ID。 适用于在同一个 shell 中运行多个相互隔离的 CLI 会话,例如并行的 CI 矩阵作业。 使用 [`te session`](xref:te-cli-commands#session) 查看并管理会话。 | -| `TE_COMPAT` | 设为 `te2` 可强制启用 TE2 兼容模式;参见 @te-cli-migrate。 | +| 变量 | 用途 | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `TE_CONFIG` | 替代配置文件的路径。 所有 `te config` 操作(`show`、`set`、`init`、`paths`)都会遵循该变量的设置。 | +| `TE_MACROS_PATH` | 覆盖宏文件路径(在解析顺序中排第二,见上文)。 由 `te macro` 命令读取。 | +| `TE_BPA_RULES` | 覆盖 `te bpa run` 和 `te bpa rules` 子命令使用的 BPA 规则文件/URL 列表。 | +| `TE_BPA_CONFIG` | 覆盖 deploy/save 门禁读取的 BPA 门禁配置 (`.te-bpa.json`) 的路径。 | +| `TE3_EXE_PATH` | Tabular Editor 3 桌面版二进制文件的路径。 此项 **仅** 用于 `te open`;在 Linux/macOS 上或不使用 `te open` 时,可安全留空。 会回退到 `PATH` 查找。 | +| `TE_DEBUG` | 设为 `1` 可全局启用调试日志(等同于 `--debug` 或配置中的 `debug: true`)。 | +| `NO_SPINNER` | 设为 `1` 或 `true` 可禁用动画进度指示器(可替代配置中的 `spinner: false`)。 | +| `CI` | 自动检测。 当设为 `1` 或 `true` 时,CLI 会禁用动画进度指示器,并切换为纯文本输出。 大多数 CI 运行器都会自动设置此项。 | +| `TE_SESSION` | 覆盖用于活动连接状态的按终端划分的会话 ID。 适用于在同一个 shell 中运行多个相互隔离的 CLI 会话,例如并行的 CI 矩阵作业。 使用 [`te session`](xref:te-cli-commands#session) 查看并管理会话。 | +| `TE_INTERACTIVE` | Override `launchInteractiveMode` for a single invocation. Accepts `auto`, `always`, or `never`. Handy for one-off scripts that want the interactive REPL (`TE_INTERACTIVE=always`) or want to force the classic help-on-empty behavior (`TE_INTERACTIVE=never`) without touching the config file. | +| `TE_COMPAT` | 设为 `te2` 可强制启用 TE2 兼容模式;参见 @te-cli-migrate。 | ## 相关页面 From 0b1a6ddb93a0204937156d6b95d401ba1571d9eb Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:24 +0200 Subject: [PATCH 48/49] New translations te-cli-interactive.md (Chinese Simplified) [ci skip] --- .../features/te-cli/te-cli-interactive.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/localizedContent/zh/content/features/te-cli/te-cli-interactive.md b/localizedContent/zh/content/features/te-cli/te-cli-interactive.md index 1526c2c6c..140203650 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli-interactive.md +++ b/localizedContent/zh/content/features/te-cli/te-cli-interactive.md @@ -149,6 +149,27 @@ Two separate messages can appear at the start of a session - don't conflate them - The **welcome banner** is the interactive splash described under [Starting a session](#starting-a-session). It is suppressed with `--no-banner`. When stdin is piped, no welcome banner is emitted in the first place, so `--no-banner` has a visible effect only in a true interactive (TTY) session. - The **preview-expiry notice** (`This is an early preview release ...`) is a different message. It is always written to **stderr** and is **not** affected by `--no-banner`. Suppress it with `te config set hidePreviewNotice true`. +## Auto-launch on empty invocation + +Running `te` in a terminal with no arguments drops you straight into the interactive REPL, so exploring a model is as fast as opening a shell and typing `te`. When stdin, stdout, or stderr is redirected (piped output, CI pipelines, scripts), the CLI falls through to its normal parse and prints help instead - so shell scripts that invoke `te` without a subcommand keep behaving the same way. + +The behavior is controlled by the `launchInteractiveMode` config key with three values: + +| 值 | Effect | +| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `auto` (default) | Launch the REPL only when all three streams are attached to a TTY. Otherwise fall through to normal parse. | +| `always` | Launch the REPL regardless of stream redirection. Useful when you always want an interactive session. | +| `never` | Never auto-launch the REPL. `te` on its own prints help, matching the pre-0.6.0 behavior. | + +Change it globally with: + +```bash +te config set launchInteractiveMode never # keep the classic help-on-empty behavior +te config set launchInteractiveMode auto # restore the default +``` + +Override for a single invocation via the `TE_INTERACTIVE` environment variable (same values), or pass `--non-interactive` on the command line - both force `never` for that call, so `te --non-interactive` prints help instead of launching the REPL. + ## 何时使用交互模式与非交互模式 - **交互模式** 最适合探索、学习 CLI、针对单个模型执行一次性批量编辑,以及演示。 From c478f0f145dbec0a4a8a026818cbc0c4aaa9b9fe Mon Sep 17 00:00:00 2001 From: David Bojsen Date: Thu, 2 Jul 2026 23:39:27 +0200 Subject: [PATCH 49/49] New translations te-cli.md (Chinese Simplified) [ci skip] --- localizedContent/zh/content/features/te-cli/te-cli.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/localizedContent/zh/content/features/te-cli/te-cli.md b/localizedContent/zh/content/features/te-cli/te-cli.md index 53be02e77..11b9e4ebb 100644 --- a/localizedContent/zh/content/features/te-cli/te-cli.md +++ b/localizedContent/zh/content/features/te-cli/te-cli.md @@ -59,12 +59,15 @@ CLI 将 50 多个命令划分为 10 个类别。 每个命令族都对应语义 | [配置](xref:te-cli-commands#configuration) | 设置与许可 | [`te config`](xref:te-cli-commands#config-list--paths--init--set) | | [Shell](xref:te-cli-commands#shell) | 交互模式、会话状态、Shell 自动补全 | [`te interactive`](xref:te-cli-commands#interactive), [`te session`](xref:te-cli-commands#session), [`te completion`](xref:te-cli-commands#completion) | +> [!TIP] +> The docs use canonical long-form verbs (`list`, `remove`, `move`), but the classic short forms still work as aliases (`ls`, `rm`, `mv`, `rename`). This applies to top-level commands and to `remove` / `list` subcommands under groups like `te bpa rules`, `te macro`, `te config`, `te profile`, `te session`, and `te test`. See @te-cli-commands#command-aliases for the full mapping. + ## 开始使用 1. **注册或登录**:前往 [tabulareditor.com](https://tabulareditor.com/download-tabular-editor-cli) 注册 Tabular Editor 帐户或登录。 2. **下载并安装**:Windows、macOS 和 Linux 的说明见 @te-cli-install。 3. **进行身份验证**:运行 `te auth login`,即可连接到 Power BI 或 Fabric。 见 @te-cli-auth。 -4. **运行第一个命令**:`te --help` 会列出所有命令;`te --help` 会显示详细选项。 +4. **运行第一个命令**:`te --help` 会列出所有命令;`te --help` 会显示详细选项。 Tip: running `te` on its own in a terminal drops you into the interactive REPL - a friendly way to explore a model. See @te-cli-interactive. 初次查看实时模型只需两条命令: