All Products
Search
Document Center

Data Management:Airflow DMS Operator

Last Updated:Jun 22, 2026

DMS provides custom Airflow operators for secure access to DMS-managed resources. Choose the operators that suit your workflow.

Prerequisites

Procedure

Note

For more information, see Workflow Development.

  1. Navigate to the WORKSPACE or REPOS page to configure your code.

  2. Configure the code in your Python file.

    Operator

    Description

    DMSSqlOperator

    Submits SQL to a DMS-managed database instance and retrieves the results.

    DTSLakeInjectionOperator

    Uses DTS to sync data from a DMS-managed database to OSS.

    DMSNotebookOperator

    Runs a DMS-managed notebook file (.ipynb).

    DMSAnalyticDBSparkOperator

    Submits Spark SQL to a specific resource group managed by AnalyticDB for MySQL (Lakehouse Edition) (task type: Interactive; engine: Spark).

    DMSLockFreeSqlOperator

    Runs lock-free, large-scale DML operations through the DMS chunked DML service. Ideal for bulk UPDATE or DELETE operations on large tables.

    DMSLindormSparkOperator

    Runs SQL or JAR tasks on the Lindorm Spark engine.

  3. Run the Python file in the Airflow UI or using the REST API.

Common features

The following features apply to all DMS Airflow operators.

Task cancellation

All operators implement the on_kill() method. When Airflow sends a termination signal—for example, when a task is manually marked as failed or times out—the operator automatically calls the cancellation API of the corresponding cloud service to clean up remote tasks and prevent resource waste.

Retry mechanism

Task submission and status checks include built-in retries powered by tenacity:

  • Task submission: Up to 3 retries, with a 5-second interval.

  • Status check: Up to 5 retries, with a 3-second interval.