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
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.