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]¶
Bases:
airflow.providers.common.compat.sdk.BaseOperator提交关于 Kylin 构建/刷新/合并的请求并跟踪作业状态。
有关 Apache Kylin 的详细信息,请参阅
- 参数:
kylin_conn_id (str) – Airflow 管理界面中配置的连接 ID。
project (str | None) – kylin 项目名称,此参数会覆盖 kylin_conn_id 中的项目。
cube (str | None) – kylin 立方体名称。
dsn (str | None) – (数据源名称,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 – 禁用立方体。enable – 启用立方体。purge – 清除立方体。clone – 克隆立方体,新立方体名称为 {cube_name}_clone。drop – 删除立方体。)
start_time (str | None) – 构建分段的开始时间。
end_time (str | None) – 构建分段的结束时间。
offset_start (str | None) – 流式构建分段的开始时间。
offset_end (str | None) – 流式构建分段的结束时间。
segment_name (str | None) – 分段名称。
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]¶