Can't print vm data in table view
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
When my query doesn't work for table view, it suggests that I use `--debug` to get more info, but that doesn't actually help.
**Command Name**
`vm list`
**Errors:**
```
Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
```
## To Reproduce:
```
az>> configure --defaults group=
az>> vm list --show-details --query '[].{Name:name, OS:storageProfile.osDisk.osType, Admin:osProfile.adminUsername}' --output table
Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
az>> vm list --query '[].{Name:name, OS:storageProfile.osDisk.osType, Admin:osProfile.adminUsername}' --output table
Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
az>> vm list --query '[].{Name:name, OS:storageProfile.osDisk.osType, Admin:osProfile.adminUsername}' --output table --debug
Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
az>> vm list --debug --query '[].{Name:name, OS:storageProfile.osDisk.osType, Admin:osProfile.adminUsername}' --output table
Table output unavailable. Use the --query option to specify an appropriate query. Use --debug for more info.
az>> vm list --debug --query '[].{Name:name, OS:storageProfile.osDisk.osType, Admin:osProfile.adminUsername}' --output table
az>> az feedback
```
## Expected Behaviour
It would print a table with the info I want or it would tell me why it can't do that.
## Environment Summary
```
macOS-10.15.4-x86_64-i386-64bit
Python 3.8.2
Installer: HOMEBREW
azure-cli 2.5.1
Extensions:
interactive 0.4.4
```
## Additional Context
Some of these were direct examples from https://docs.microsoft.com/en-us/cli/azure/query-azure-cli?view=azure-cli-latest. The json output looks like it should be trivial to display as a table:
```
az>> vm list --debug --query '[].{Name:name, OS:storageProfile.osDisk.osType, Admin:osProfile.adminUsername}' --output json
[
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
},
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
},
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
},
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
},
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
},
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
},
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
},
{
"Admin": "redacted",
"Name": "redacted",
"OS": "redacted"
}
]
```
Contributor guide
Assessment
This issue has not been assessed yet.