Azure / azure-cli

Azure Command-Line Interface
MIT License
3.96k stars 2.94k forks source link

Add `csv` as a supported output format #29385

Open dcaro opened 1 month ago

dcaro commented 1 month ago

Preconditions

Related command

No response

Resource Provider

N/A

Description of Feature or Work Requested

Azure CLI supports several output format as described in the following page: https://learn.microsoft.com/en-us/cli/azure/format-output-azure-cli

Supporting 'csv' as an output format would simplify workflows that rely on Excel.

Minimum API Version Required

N/A

Swagger PR link / SDK link

N/A

Request Example

No response

Target Date

2024-11-01

PM Contact

dcaro

Engineer Contact

N/A

Additional context

No response

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.

jiasli commented 1 month ago

The output formats are provided by knack: https://github.com/microsoft/knack/blob/b1164b57d777711fd3954cf11f18ffb06ab1ca5b/knack/output.py#L94-L101

I submitted the same feature request https://github.com/microsoft/knack/issues/187 4 years ago.

A similar format that we already support is tsv. Supporting cvs would be a low-hanging fruit.

VK9999 commented 1 month ago

As discussed thanks for opening this request Damien.