Airflow is ideal for complex workflows where you need fine-grained control over task execution, dependencies, and schedules. You would use Airflow over AWS Glue when you have multiple interconnected systems that require intricate orchestration. For example, if you're handling a data pipeline that involves data extraction from multiple sources, transformation with various conditional logic, and loading into different destinations with specific success/failure notifications, Airflow's DAG (Directed Acyclic Graph) capabilities allow you to define these dependencies and control the execution flow precisely.
AWS Glue is a good choice when you want a serverless ETL solution that manages the infrastructure for you. Use it when dealing with data in AWS services like S3, especially for batch processing and transforming large datasets quickly. For instance, if your organization needs to extract data from an S3 bucket, transform it using a predefined schema, and load it into an Athena table, AWS Glue would be ideal as it can handle the entire ETL process without requiring you to set up and maintain a workflow or servers.