Following Airflow tutorial here.
Problem: The webserver returns the following error
Broken DAG: [/usr/local/airflow/dags/test_operat
In my case I managed to make a custom operator with the following steps:
from airflow.operators import MacrosPostgresOperatorcustom_operator.py and the code is pretty simplefrom airflow.plugins_manager import AirflowPlugin
from airflow.operators.postgres_operator import PostgresOperator
class MacrosPostgresOperator(PostgresOperator):
template_fields = ('sql', 'parameters')
class MacrosFirstPlugin(AirflowPlugin):
name = "macros_first_plugin"
operators = [MacrosPostgresOperator]