I figured how to go about doing this. But I am having some issues.
I would really appreciate some help here to guide me through what I am doing wrong.
sql_alchemy_conn_cmd = `python ~/setup/configure.py`
(configure.py is my python script located in the 'setup' directory under my ${AIRFLOW_HOME} )
When I try to start airflow, this is the error I see:
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 4, in <module>
from airflow import configuration
File "/usr/local/lib/python2.7/dist-packages/airflow/__init__.py", line 16, in <module>
from airflow.models import DAG
File "/usr/local/lib/python2.7/dist-packages/airflow/models.py", line 40, in <module>
from airflow import settings, utils
File "/usr/local/lib/python2.7/dist-packages/airflow/settings.py", line 51, in <module>
SQL_ALCHEMY_CONN = conf.get('core', 'SQL_ALCHEMY_CONN')
File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py", line 520, in get
return conf.get(section, key, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py", line 416, in get
return run_command(command)
File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py", line 50, in run_command
command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory