Ash*_*mar 2 python directed-acyclic-graphs google-cloud-platform airflow
我需要通过DAG 中的任何特定任务查找时间量。
例如:
SampleTask=DummyOperator(
task_id='SampleTask',
dag=dag)
Run Code Online (Sandbox Code Playgroud)
现在我想知道上述任务所花费的时间是如何基于其 task_id 的,其他任务也是如此。
如果您从 Airflow UI转到Data Profiling > Ad Hoc Query,并选择airflow_db数据库,您可以发出以下查询:
select execution_date, duration from task_instance where task_id = 'SampleTask'
Run Code Online (Sandbox Code Playgroud)
该duration列包含任务运行的秒数。
| 归档时间: |
|
| 查看次数: |
1320 次 |
| 最近记录: |