Skip to content

table_transformer not working when --query set #20789

@yuwzho

Description

@yuwzho

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
-o table output is different when adding --query, even the query is filter something instead of trunc some columns.

To Reproduce
This two commands want to list azure subscriptions under the account. The first one run w/o query, the second filter out the subscriptions in AzureCloud cloud. But the table format are different. One have tenant id while the other not.

This also happens on service command who specify the table_transformer for the command.

az account list -o table
Name                                               CloudName    SubscriptionId                        State    IsDefault
-------------------------------------------------  -----------  ------------------------------------  -------  -----------
az account list -o table --query [?cloudName=='AzureCloud']
Name                                               State    IsDefault    TenantId                              HomeTenantId                          CloudName
-------------------------------------------------  -------  -----------  ------------------------------------  ------------------------------------  -----------

Expected behavior
table_transformer is executed

Environment summary

Windows 10

{
  "azure-cli": "2.31.0",
  "azure-cli-core": "2.31.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
  }
}

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions