Repository navigation
Allow custom columns in cli dags list - #35250
Conversation
hussein-awala
left a comment
There was a problem hiding this comment.
I have two comments:
- the
additional-columnsargument could help to close the issue, but we will always have the four columns (dag_id, filepath, owner and paused), but if we implement an argument for the columns to return and set it by default to these four columns, the user will be able to remove some of these columns from the returned result or add extra columns. - if the user provides a column name not found in the dag_details dict, the CLI will silently skip it, shall we validate the provided columns and raise an exception or at least a warning?
WDYT?
|
@hussein-awala Thank you for your comments! I think both are good suggestions and pushed some changes to reflect them.
I just want to note the default behavior of Before After |
Lee-W
left a comment
There was a problem hiding this comment.
I left some nitpicks. But overall looks good to me 🙌
77c505c to
9bac6b8
Compare
|
Merged the suggestions and fixed the tests ! |
9d3de81 to
9bac6b8
Compare
…or invalid columns
Co-authored-by: Wei Lee <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
Co-authored-by: Wei Lee <[email protected]>
04beaf5 to
4d93a68
Compare
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
|
Hi @jtmiclat you've mentioned 'Note: Will have a follow up pr to minimize database calls', was that done as well ? |
|
Hi @sidrahsayyad I haven't worked on it |
| ) | ||
|
|
||
| def get_dag_detail(dag: DAG) -> dict: | ||
| dag_model = DagModel.get_dagmodel(dag.dag_id, session=session) |
There was a problem hiding this comment.
get_dagmodel can return none. This introduced a bug
This closes #34765
This adds an additional optional parameter
columnsto the cli commandairflow dags list.Examples:
Note: Will have a follow up pr to minimize database calls