0
0
Apache Airflowdevops~20 mins

Connection management for cloud services in Apache Airflow - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud Connection Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Airflow Connections for Cloud Services

What is the primary purpose of using Airflow Connections when working with cloud services?

ATo write Python code that interacts with cloud APIs directly inside DAGs.
BTo schedule DAG runs at specific times automatically.
CTo securely store and manage credentials and connection details for cloud services.
DTo monitor the health of cloud services in real-time.
Attempts:
2 left
💡 Hint

Think about how Airflow keeps sensitive information safe and reusable.

💻 Command Output
intermediate
1:30remaining
Output of Listing Airflow Connections

What is the output of the following command if you have one connection named 'aws_default' configured?

airflow connections list
AA table listing connection IDs including 'aws_default' with its type and extra info.
BAn error saying 'command not found'.
CA blank output with no connections listed.
DA JSON string with connection details.
Attempts:
2 left
💡 Hint

Think about what the 'list' command shows in Airflow CLI.

Configuration
advanced
2:00remaining
Correct Airflow Connection URI for Google Cloud Storage

Which of the following is the correct Airflow connection URI format to connect to Google Cloud Storage using a service account JSON key file?

Agoogle-cloud-platform://?extra__google_cloud_platform__key_path=/path/to/key.json
Bgcp://service_account.json
Cgs://service_account.json
Dgoogle://keyfile=/path/to/key.json
Attempts:
2 left
💡 Hint

Look for the correct prefix and how extra parameters are passed in Airflow connection URIs.

Troubleshoot
advanced
2:00remaining
Troubleshooting Airflow Connection Authentication Failure

You have set up an Airflow connection to AWS but your DAG fails with an authentication error. Which of the following is the most likely cause?

AThe AWS region is not specified in the DAG code.
BThe AWS access key and secret key are missing or incorrect in the Airflow connection configuration.
CThe Airflow scheduler is not running.
DThe DAG file is missing the import statement for the AWS hook.
Attempts:
2 left
💡 Hint

Authentication errors usually relate to credentials.

🔀 Workflow
expert
2:30remaining
Best Practice Workflow for Managing Cloud Service Connections in Airflow

Which workflow correctly describes the best practice for managing cloud service connections securely and efficiently in Airflow?

AUse public cloud credentials without restrictions to simplify connection setup.
BHardcode credentials in DAG files for easy access and version control.
CStore credentials in plain text files on the Airflow server and read them in DAGs.
DStore credentials in Airflow Connections, use environment variables for sensitive info, and restrict access to Airflow UI and metadata DB.
Attempts:
2 left
💡 Hint

Think about security and maintainability in managing credentials.