You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/29 11:07:23 UTC

[GitHub] [airflow] turbaszek opened a new issue #12699: Use yaml/json output instead of tables in cli

turbaszek opened a new issue #12699:
URL: https://github.com/apache/airflow/issues/12699


   **Description**
   
   In `list` commands (for example dag runs, connection) we may output yaml representation of the information instead of table. Why?
   - It's consistent and well structured
   - Easy to pipe to another command
   
   
   **Use case / motivation**
   
   Make airflow cli commands more consistent and easier to use.
   
   Example:
   ```
   root@1aa14208df15:/opt/airflow# airflow dags list-jobs
   - dag_id: tasks_are_awesome
     end_date: '2020-11-29 11:04:39.652633+00:00'
     job_type: LocalTaskJob
     start_date: '2020-11-29 11:04:39.157918+00:00'
     state: success
   - dag_id: tasks_are_awesome
     end_date: '2020-11-29 11:04:39.647816+00:00'
     job_type: LocalTaskJob
     start_date: '2020-11-29 11:04:39.129878+00:00'
     state: success
   - dag_id: tasks_are_awesome
     end_date: '2020-11-29 11:04:39.682591+00:00'
     job_type: LocalTaskJob
     start_date: '2020-11-29 11:04:39.118681+00:00'
     state: success
   - dag_id: tasks_are_awesome
     end_date: '2020-11-29 11:04:39.651830+00:00'
     job_type: LocalTaskJob
     start_date: '2020-11-29 11:04:39.105410+00:00'
     state: success
   - dag_id: tasks_are_awesome
     end_date: '2020-11-29 11:04:29.604613+00:00'
     job_type: LocalTaskJob
     start_date: '2020-11-29 11:04:29.101670+00:00'
     state: success
   - dag_id: tasks_are_awesome
     end_date: '2020-11-29 11:04:43.947281+00:00'
     job_type: BackfillJob
     start_date: '2020-11-29 11:04:23.702872+00:00'
     state: success
   ```
   or json-like
   ```
   root@1aa14208df15:/opt/airflow# airflow dags list-jobs
   [{"dag_id": "tasks_are_awesome", "state": "success", "job_type": "LocalTaskJob", "start_date": "2020-11-29 11:04:39.157918+00:00", "end_date": "2020-11-29 11:04:39.652633+00:00"}, {"dag_id": "tasks_are_awesome", "state": "success", "job_type": "LocalTaskJob", "start_date": "2020-11-29 11:04:39.129878+00:00", "end_date": "2020-11-29 11:04:39.647816+00:00"}, {"dag_id": "tasks_are_awesome", "state": "success", "job_type": "LocalTaskJob", "start_date": "2020-11-29 11:04:39.118681+00:00", "end_date": "2020-11-29 11:04:39.682591+00:00"}, {"dag_id": "tasks_are_awesome", "state": "success", "job_type": "LocalTaskJob", "start_date": "2020-11-29 11:04:39.105410+00:00", "end_date": "2020-11-29 11:04:39.651830+00:00"}, {"dag_id": "tasks_are_awesome", "state": "success", "job_type": "LocalTaskJob", "start_date": "2020-11-29 11:04:29.101670+00:00", "end_date": "2020-11-29 11:04:29.604613+00:00"}, {"dag_id": "tasks_are_awesome", "state": "success", "job_type": "BackfillJob", "start_date": "2020-
 11-29 11:04:23.702872+00:00", "end_date": "2020-11-29 11:04:43.947281+00:00"}]
   ```
   
   **Related Issues**
   
   https://github.com/apache/airflow/pull/12698#discussion_r532191545
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] turbaszek closed issue #12699: Add yaml/json output format support for many CLI commands

Posted by GitBox <gi...@apache.org>.
turbaszek closed issue #12699:
URL: https://github.com/apache/airflow/issues/12699


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #12699: Use yaml/json output instead of tables in cli

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #12699:
URL: https://github.com/apache/airflow/issues/12699#issuecomment-735377570


   Do you mean _remove_ tables, or _add_ option to output json/yaml?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] turbaszek commented on issue #12699: Use yaml/json output instead of tables in cli

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #12699:
URL: https://github.com/apache/airflow/issues/12699#issuecomment-735377687


   > Do you mean _remove_ tables, or _add_ option to output json/yaml?
   
   Add option, as in docker / kubernetes. The table would be the default view but users would have possibility to use "better" structured output.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #12699: Add yaml/json output format support for many CLI commands

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #12699:
URL: https://github.com/apache/airflow/issues/12699#issuecomment-735378118


   > @potiuk @ashb what do you think about dropping support for different tables in `--output` flag?
   
   No opinion.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] turbaszek commented on issue #12699: Use yaml/json output instead of tables in cli

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #12699:
URL: https://github.com/apache/airflow/issues/12699#issuecomment-735376279


   CC @ashb @kaxil @XD-DENG @potiuk @mik-laj 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on issue #12699: Use yaml/json output instead of tables in cli

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #12699:
URL: https://github.com/apache/airflow/issues/12699#issuecomment-735377708






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] turbaszek commented on issue #12699: Add yaml/json output format support for many CLI commands

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #12699:
URL: https://github.com/apache/airflow/issues/12699#issuecomment-735378025


   @potiuk @ashb what do you think about dropping support for different tables in `--output` flag?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org