home
diamond Go Premium
Data Engineering Path  ·  Airflow
Apache Airflow Logo

Hands-On Quiz — Operators & Hooks

Practice Exercises

Exercise 1: Build an ETL DAG

Create a DAG using operators that:

  1. Uses HttpSensor to wait for an API to be available
  2. Uses PythonOperator to extract data from the API
  3. Uses PythonOperator to transform the data
  4. Uses BashOperator to trigger a dbt run
  5. Has proper error handling with retries and email alerts

Exercise 2: Custom Hook Usage

Write a @task function that uses PostgresHook to:

  1. Connect to a PostgreSQL database
  2. Run a data quality check (count rows, check for nulls)
  3. Push the results to XCom
  4. Raise an exception if quality checks fail

Exercise 3: Sensor Mode Comparison

Create a DAG with three branches, each using the same FileSensor but with different modes:

  1. mode="poke" with poke_interval=10
  2. mode="reschedule" with poke_interval=60
  3. deferrable=True

Run the DAG and observe the differences in the Gantt chart view.

lock

This content is reserved for Premium Members.

Upgrade to Premium

Entity Details

Create New Item

help

Submit Technical Query

Have a question or run into an issue? Describe it below, upload an optional screenshot, and our engineering team will answer it!

image Attach image (optional)

Submit Feedback

build Free Developer Utility Free Tool
gavel

Privacy & Legal Disclaimer

1. Client-Side Browser Processing

All utility tools on DeepEngineerHub (including Image to PDF, Text Formatters, JSON Converters, and Encryptors) execute 100% locally within your client browser using WebAssembly and JavaScript. No uploaded images, text, or documents are transmitted, collected, or stored on remote servers.

2. Limitation of Liability ("As-Is" Provision)

Tools and services are provided free of charge for convenience and educational purposes "as-is" without warranties of any kind. DeepEngineerHub shall not be held liable for any data loss, formatting inconsistencies, or indirect damages resulting from tool usage.

3. Open Source & Third-Party Software

Certain utilities utilize open-source client libraries (such as jsPDF, Mermaid.js, Pyodide) licensed under MIT, Apache, or BSD open licenses. All intellectual property remains with their respective copyright holders.