Re: The best place to initialize a db table whenever airflow starts ?

2016-11-01 Thread siddharth anand
A DAG Run is a run for a particular dag at a particular time. For example, if your DAG were called FOO and if its schedule interval were @hourly, then you would have DAG runs : Foo @ noon, Foo @ 1p, Foo @ 2p, etc... If you need to seed a table prior to each run, just add a task at the start of you

The best place to initialize a db table whenever airflow starts ?

2016-11-01 Thread Michael Gong
Hi, I have a MySQL table, which will be stored some static information. The information could be different for different airflow runs, so I hope to use python code to initialize it whenever airflow starts. Where is the best place to put such code ? Is the class DagBag's __init__() a good can