Hi Michael,

You could leverage the Variable feature in Airflow: start by setting a
different environment variable in each env, and then in your DAG file,
instead of hard-coding the schedule, call a method that looks up which
environment it is (using Variable.get) and returns the desired one.

Hope this helps!

On Wed, Nov 1, 2017 at 11:10 AM, Michael Crawford <
[email protected]> wrote:

> Hi All,
>
> Is there a best practice regarding registering similar DAGs which only
> differ in small variables.
>
> For instance say I have an certain ETL that I want to run on several
> different environments on different schedules.
>
> All of the DAGs would essentially be the exactly the same just with a few
> different parameters.
>
> It doesn’t seem like duplicating the DAG code over and over is the right
> way to do this.
>
> Thanks,
> Mike
>

Reply via email to