Airflow 峰會 2025 將於 10 月 07 日至 09 日舉行。立即註冊以獲取早鳥票!

airflow.models.taskinstancekey

TaskInstanceKey

用於標識任務例項的鍵。

模組內容

class airflow.models.taskinstancekey.TaskInstanceKey[source]

基類:NamedTuple

用於標識任務例項的鍵。

dag_id: str[source]
task_id: str[source]
run_id: str[source]
try_number: int = 1[source]
map_index: int = -1[source]
property primary: tuple[str, str, str, int][source]

返回鍵中用於任務例項主鍵的部分。

with_try_number(try_number)[source]

返回帶有提供的 try_number 的 TaskInstanceKey。

property key: TaskInstanceKey[source]

為了與 TaskInstance 相容 API。

返回自身

classmethod from_dict(dictionary)[source]

從字典建立 TaskInstanceKey。

此條目有幫助嗎?