Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty results on query for table output #638

Closed
gsacavdm opened this issue Feb 14, 2018 — with docs.microsoft.com · 3 comments
Closed

Empty results on query for table output #638

gsacavdm opened this issue Feb 14, 2018 — with docs.microsoft.com · 3 comments
Assignees

Comments

Copy link

gsacavdm commented Feb 14, 2018

Are there any special considerations with -o table that I should be aware of? Why does this not return any results?

az vm list --query "[].{id:id}" -o table

Yet this does:

az vm list --query "[].{id:id}" -o json

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

  • ID: 48273ba7-da5a-95f0-7ffc-8c6d5282313d
  • Version Independent ID: 83d348f9-fd1f-1041-0304-d8634e5526d4
  • Content
  • Content Source
  • Service: multiple
@sptramer
Copy link
Contributor

sptramer commented Feb 14, 2018

It looks like this is related to a known issue which is considered a feature request (Azure/azure-cli#5434). Because there are multiple values contained within an array, the table output doesn't seem to know how to appropriately handle it.

I'll make sure to update documentation to indicate that these issues are there, and that table may not work with sub-arrays and sub-dictionaries.

@sptramer sptramer self-assigned this Feb 14, 2018
@sptramer
Copy link
Contributor

sptramer commented Feb 15, 2018

Correction: This is definitely a separate issue! Some fields are filtered out by name. Updated the documentation to reflect this.

sptramer added a commit that referenced this issue Feb 16, 2018
Change table format documentation to be accurate. [#638]
@sptramer
Copy link
Contributor

The output format information has been updated to indicate that the id key is always stripped from table output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants