1. 程式人生 > >azkaban 工作流2.0開發示例

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;