Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active December 26, 2020 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/8b8c16eec8c24d01c770de1164ac0728 to your computer and use it in GitHub Desktop.
Save garystafford/8b8c16eec8c24d01c770de1164ac0728 to your computer and use it in GitHub Desktop.
def print_airflow_cfg():
with open(f"{os.getenv('AIRFLOW_HOME')}/airflow.cfg", 'r') as airflow_cfg:
file_contents = airflow_cfg.read()
print(f'\n{file_contents}')
get_airflow_cfg_operator = PythonOperator(
task_id='get_airflow_cfg_task',
python_callable=print_airflow_cfg
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment