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) – streaming 建置 segment 開始時間
offset_end (str | None) – streaming 建置 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 – (工作錯誤狀態,若工作狀態在此列表中,此任務將會錯誤。預設值為 tuple([“ERROR”, “DISCARDED”, “KILLED”, “SUICIDAL”, “STOPPED”]))
- template_fields: collections.abc.Sequence[str] = ('project', 'cube', 'dsn', 'command', 'start_time', 'end_time', 'segment_name', 'offset_start',...[source]¶