Yes, that is possible but I still need the hook to ensure the DAG class is
overridden.

Any suggestion how this can be done without forking the code?

Thanks,
Thomas


On Thu, Apr 6, 2017 at 6:02 PM, Maxime Beauchemin <
maximebeauche...@gmail.com> wrote:

> You could derive the DAG class and override process_file. Then you'd need
> to make sure your users/pipelines import your derivative instead of
> `airflow.DAG`.
>
> Max
>
> On Thu, Apr 6, 2017 at 5:41 PM, Thomas Weise <t...@apache.org> wrote:
>
> > Hi,
> >
> > I want to include custom filtering logic into process_file when loading
> > DAGs from dag_folder.
> >
> > For that I need the file path and the DAG object that contains owner and
> > name. Based on these 3 pieces of information, I want to decide whether to
> > accept the DAG or not.
> >
> > It is possible to modify airflow/models.py to add this custom logic, but
> > I'm looking for a way to accomplish that via configuration vs. code
> change.
> > Are there any suggestions how to address this (maybe by adding a plug-in
> or
> > a configurable expression)?
> >
> > Thanks,
> > Thomas
> >
>

Reply via email to