airflow.providers.apache.kylin.operators.kylin_cube¶
類¶
提交 Kylin 構建/重新整理/合併請求並跟蹤作業狀態。 |
模組內容¶
- class airflow.providers.apache.kylin.operators.kylin_cube.KylinCubeOperator(*, kylin_conn_id='kylin_default', project=None, cube=None, dsn=None, command=None, start_time=None, end_time=None, offset_start=None, offset_end=None, segment_name=None, is_track_job=False, interval=60, timeout=60 * 60 * 24, eager_error_status=('ERROR', 'DISCARDED', 'KILLED', 'SUICIDAL', 'STOPPED'), **kwargs)[source]¶
基類:
airflow.models.BaseOperator提交 Kylin 構建/重新整理/合併請求並跟蹤作業狀態。
有關 Apache Kylin 的更多詳細資訊
- 引數:
kylin_conn_id (str) – 在 Airflow 管理介面中配置的連線 ID。
project (str | None) – Kylin 專案名稱,此引數將覆蓋 kylin_conn_id 中的專案。
cube (str | None) – Kylin Cube 名稱
dsn (str | None) – (DSN, Kylin 連線的 DSN URL,它將覆蓋 kylin_conn_id。例如: kylin://ADMIN:KYLIN@sandbox/learn_kylin?timeout=60&is_debug=1)
command (str | None) – (Kylin 命令包括 'build' (構建), 'merge' (合併), 'refresh' (重新整理), 'delete' (刪除), 'build_streaming' (流式構建), 'merge_streaming' (流式合併), 'refresh_streaming' (流式重新整理), 'disable' (停用), 'enable' (啟用), 'purge' (清除), 'clone' (克隆), 'drop' (刪除)。build - 使用 /kylin/api/cubes/{cubeName}/build rest api,buildType 為 'BUILD',並且應提供 start_time 和 end_time refresh - 使用 build rest api,buildType 為 'REFRESH' merge - 使用 build rest api,buildType 為 'MERGE' build_streaming - 使用 /kylin/api/cubes/{cubeName}/build2 rest api,buildType 為 'BUILD',並且應提供 offset_start 和 offset_end refresh_streaming - 使用 build2 rest api,buildType 為 'REFRESH' merge_streaming - 使用 build2 rest api,buildType 為 'MERGE' delete - 刪除 segment,並應提供 segment_name 值 disable - 停用 cube enable - 啟用 cube purge - 清除 cube clone - 克隆 cube,新 cube 名稱為 {cube_name}_clone drop - 刪除 cube)
start_time (str | None) – 構建 segment 的開始時間
end_time (str | None) – 構建 segment 的結束時間
offset_start (str | None) – 流式構建 segment 的開始時間
offset_end (str | None) – 流式構建 segment 的結束時間
segment_name (str | None) – segment 名稱
is_track_job (bool) – (是否跟蹤作業狀態。如果值為 True,將跟蹤作業直到作業狀態為 (“FINISHED”, “ERROR”, “DISCARDED”, “KILLED”, “SUICIDAL”, “STOPPED”) 或超時)
interval (int) – 跟蹤作業狀態的間隔時間,預設值為 60 秒
timeout (int) – 超時值,預設值為 1 天,即 60 * 60 * 24 秒
eager_error_status – (作業錯誤狀態,如果作業狀態在此列表中,則此任務將標記為錯誤。預設值為元組([“ERROR”, “DISCARDED”, “KILLED”, “SUICIDAL”, “STOPPED”]))
- template_fields: collections.abc.Sequence[str] = ('project', 'cube', 'dsn', 'command', 'start_time', 'end_time', 'segment_name', 'offset_start',...[source]¶