Migrating and refactoring Airflow DAGs

Migrate Airflow DAGs from Cloudera Data Engineering to Cloudera Workflow Orchestrator and refactor them for Airflow 3 by using Code Migrator, from registering the services to testing the migrated DAGs.

  • You have a Cloudera Data Engineering service with Airflow DAGs, and a Cloudera Workflow Orchestrator instance on Anywhere Cloud with a Git repository.
  • Code Migrator is available. It is displayed when Enable LLM is on in the engine configuration of the Cloudera Migration Assistant engine.
  • You have the cma-admin role for the setup steps, and the cma-migrator or cma-admin role for the migration.
  1. Ensure that an agent serves the Cloudera Data Engineering service and the Cloudera Workflow Orchestrator instance.
    See Deploying agents on Anywhere Cloud.
  2. Register the Cloudera Data Engineering service.
    See Registering Cloudera Data Engineering services.
  3. Register the Cloudera Workflow Orchestrator instance.
    See Registering Cloudera Workflow Orchestrator.
  4. Add an AWC User Connection and a Git Connection.
    See Managing user connections.
  5. Scan the Cloudera Data Engineering service and the Cloudera Workflow Orchestrator instance.
    See Scanning clusters.
  6. Create a workload plan of the CDE Airflow Migration type, add the DAGs to a collection, and map them to the repository.
    See Migrating Airflow DAGs from Cloudera Data Engineering to Cloudera Workflow Orchestrator.
  7. Fix any duplicate DAG IDs.
    See Resolving DAG name conflicts.
  8. Check the operators that the DAGs use.
    See Airflow operator mapping.
  9. Create and run an execution.
    See Running plan executions.
  10. When the execution reaches the Review code changes step, review the refactored DAGs, and mark the step as completed.
    See Approving code changes in plan executions.
  11. Run the remaining steps.
  12. In Cloudera Workflow Orchestrator, check and test the migrated DAGs.
The refactored DAGs are in the Git repository of Cloudera Workflow Orchestrator, and the source Cloudera Data Engineering service is unchanged.

The migrated DAGs fail until the Spark jobs that they run exist on the target. The execution created a plan for those jobs, named [***AIRFLOW PLAN***] - Spark jobs. Run it next.

To migrate the Spark jobs that the DAGs run, see Migrating and refactoring Spark jobs.