Airflow と格闘中(5)
nakano-tomofumi.hatenablog.com
のつづき。
今日で終わりにしたい。
airflow のコマンドを調べる
render
タスクの実行内容を表示する。BashOperator
なら test -dr
とほぼ同等。
trigger_dags
DAG の実行のトリガーを引く。求めていた機能の可能性。 -e
オプションで日付指定できるが、既に ‘backfill’ で実行した DAG に対しては次のようなエラーとなる。
sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: dag_run.dag_id, dag_run.execution_date
こういうSQLのエラーじゃなくて、既に実行したよ、的なメッセージを表示してほしいのだが。 まだ実行していない日付を指定すると、
[2017-04-28 11:34:54,967] {__init__.py:57} INFO - Using executor SequentialExecutor [2017-04-28 11:34:55,326] {models.py:167} INFO - Filling up the DagBag from /work_dir/airflow/dags [2017-04-28 11:34:55,618] {cli.py:185} INFO - Created <DagRun DAG_ID @ 2017-04-23 00:00:00: manual__2017-04-23T00:00:00, externally triggered: True>
となるが、実行はされていない模様。誰が実行するのだろう…。あ、スケジューラを起動しないといけないのか。