maahir22 commented on code in PR #30432:
URL: https://github.com/apache/airflow/pull/30432#discussion_r1155343560
##########
airflow/cli/commands/dag_command.py:
##########
@@ -343,6 +344,24 @@ def dag_list_dags(args):
)
+@cli_utils.action_cli
+@suppress_logs_and_warning
+@provide_session
+def dag_details(args, session=NEW_SESSION):
+ """Get DAG details given a DAG id"""
+ dag = DagModel.get_dagmodel(args.dag_id, session=session)
+ if not dag:
+ raise SystemExit(f"DAG: {args.dag_id} does not exist in 'dag' table")
+ dag_detail = dag_schema.dump(dag)
+ for key, value in dag_detail.items():
+ if isinstance(value, dict):
+ print(f"\t{key}:")
+ for subkey, subvalue in value.items():
+ print(f"\t\t{subkey}: {subvalue}")
+ else:
+ print(f"\t{key}: {value}")
Review Comment:
Ooo so essentially a transpose of the current table?
Let me know if I understand it currently, if initially the columns were
scheduler_lock, is_active with Row1 being [], False -> now the rows will be
scheduler_lock, is_active with Column1 having [], False?
Also, do we want this to be a new output type like --ttable? (Extra t for
transposed)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]