azkaban 工作流2.0开发示例

azkaban

目录结构

flow_test.flow
flow_test.project
flow_test.zip
test.sql

用于测试工作流的简单示例。

flow_test.flow

---
config:
  failure.emails: [email protected]
  success.emails: [email protected]
  param.date: 1970-01-01

nodes:

  - name: crm_schedule_start
    type: command
    config:
      command: hivef test.sql ${param.date}

说明:hivef 是我们封装的一个hive -f ... 的 shell 文件,支持传递多个参数。包括对日期参数的校验和处理。param.date: 1970-01-01 就是初始化用的日期参数。

flow_test.project

azkaban-flow-version: 2.0

仅仅一行,用与指明使用 azkaban 新支持的工作流2.0版本。

test.sql

select a.* from base.cc_cdr_log a where a.`date` = "${date}" limit 5;

猜你喜欢

转载自www.cnblogs.com/myblog1900/p/10164992.html