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]¶