0

I know that for example if we have several sql files in the data folder we can set priorities like script1 >> script2 in the end. However, can we set priorities of other airflow scripts which are actually in the dag folder?

1 Answer 1

2

Those are not priorities, those are execution order. If you want a particular DAG to execute first then just set it at an earlier execution time than other DAGs.

script1 >> script2 means that script1 executes first and only then script2 executes.

You can try to artificially enforce priority by assigning a specific DAG to a named queue where it is the only DAG that executes in that named queue. Other than that there is no explicit way to have priority for entire DAGs.

For an Operator inside a DAG however you can use the priority_weight parameter in the BaseOperator.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Medhdeep that makes sense!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.