-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Preserve the order of keys in the output table #6941
Comments
I run into the same problem with |
This is very much needed. It's amazing that this is not the default behavior. Furthermore when it IS the actual behavior for |
I need this feature badly as well. Is there any new on this? |
It should be legit if this was a thing. |
Would really like to see this as an option as well. Currently have to get creative with names, or prefix them with digits as an ugly hack/option. |
It's not ideal but you can fake it by producing an array of arrays and stick an ersatz column heading on with literals, e.g.
however generally I'll reach for better tools at this point e.g. |
Describe the feature
Currently, when performing a query and setting the output format to 'table', the order of the query keys is not preserved. For example, we can see in this example that the order the query keys (
Name
,ImageId
,CreationDate
) differs from the order of the column headers in the output table (CreationDate
,ImageId
,Name
).The feature would add support for preserving the order of keys specified in a query in the output table. For example, if the keys in the query are specified in order of
Name
,ImageId
, andCreationDate
, the order of the columns in the output table would beName
,ImageId
, andCreationDate
.Use Case
When running commands with
--output table
, the output should be easier to read. Having the output columns rendered in the order that I've specified in the query would help readability.Proposed Solution
#5581
Other Information
No response
Acknowledgements
CLI version used
any
Environment details (OS name and version, etc.)
any
The text was updated successfully, but these errors were encountered: