I have some SQL queries I want to store in a file so I can call them easily. The file is named sql_queries.py
and stored in a helpers
folder under plugins
folder.
from airflow.plugins_manager import AirflowPlugin
import helpers
class SqlQueries:
songplay_table_insert = ("""
SELECT *
FROM XXXX
""")
class Project(AirflowPlugin):
name = "Project"
helpers = [SqlQueries]
I'm trying to import my queries from my dag like this from airflow.helpers import SqlQueries
I've used the same system for operators and it works. Why it doesn't in this case?