Which of the following is the main reason to maintain separate Airflow environments for development, staging, and production?
Think about why testing in a safe place before production is important.
Separate environments allow developers to test changes without risking production stability or data integrity.
Given the following command run in the staging Airflow environment, what is the output?
echo $AIRFLOW_ENV
Check which environment variable is set for staging.
The AIRFLOW_ENV variable is set to 'staging' in the staging environment to distinguish it from dev and prod.
Which Airflow configuration snippet correctly sets the database URI for the production environment using environment variables?
Check the correct config key spelling and environment variable syntax.
The correct key is 'sql_alchemy_conn' and environment variables are referenced with ${VAR} or $VAR in some shells, but Airflow config uses ${VAR} syntax inside the config file.
Which deployment workflow ensures safe promotion of DAGs from development to production in Airflow?
Think about how to test changes progressively before production.
This workflow uses branches and environments to test changes step-by-step, reducing risk of errors in production.
The production Airflow environment suddenly fails to connect to its database. The error log shows: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server. The sql_alchemy_conn in airflow.cfg is set to ${PROD_DB_URI}. What is the most likely cause?
Check if the environment variable used in the config is properly set.
If PROD_DB_URI is missing or empty, Airflow cannot connect to the database, causing the OperationalError.