Cloudera Workflow Orchestrator operators and hooks

In Cloudera Workflow Orchestrator, operators and hooks are the fundamental building blocks used to define what a workflow actually does. While a DAG defines the structure, operators and hooks handle the execution logic and external integrations.

Operators

An operator represents a single, atomic unit of work within a DAG. When an operator is instantiated in a DAG, it is called a Task. Cloudera Workflow Orchestrator provides a vast library of operators, but they generally fall into the following categories:
  • Action Operators – These perform a specific action or command.
    • CDERunJobOperator and CdeTriggerRunOperator – Triggers a process (a Spark or Python job) in a remote compute environment. It triggers and monitors jobs within the Cloudera Data Engineering service.
    • BashOperator – Runs a bash command or script.
    • PythonOperator – Calls an arbitrary Python function.
    • EmailOperator – Sends an email.
  • Transfer Operators – These are designed specifically to move data from a source to a destination.
    • S3ToRedshiftOperator – Loads data from an S3 bucket into a Redshift table.
  • Sensor Operators – These are a special type of operator that keep running (poll) until a certain criteria is met.
    • ExternalTaskSensor – Waits for a task in a different DAG to complete.
    • HttpSensor – Polls an HTTP endpoint until it returns a specific response.

Cloudera Workflow Orchestrator supports the following Airflow provider packages:

  • apache-airflow-providers-common-sql
  • apache-airflow-providers-http
  • apache-airflow-providers-postgres
  • apache-airflow-providers-cncf-kubernetes
  • apache-airflow-providers-amazon
  • apache-airflow-providers-apache-hdfs
  • apache-airflow-providers-apache-iceberg
  • apache-airflow-providers-apache-impala
  • apache-airflow-providers-apache-livy
  • apache-airflow-providers-apache-spark
  • apache-airflow-providers-celery
  • apache-airflow-providers-common-compat
  • apache-airflow-providers-common-io
  • apache-airflow-providers-common-messaging
  • apache-airflow-providers-docker
  • apache-airflow-providers-elasticsearch
  • apache-airflow-providers-ftp
  • apache-airflow-providers-git
  • apache-airflow-providers-google
  • apache-airflow-providers-grpc
  • apache-airflow-providers-hashicorp
  • apache-airflow-providers-microsoft-azure
  • apache-airflow-providers-mysql
  • apache-airflow-providers-odbc
  • apache-airflow-providers-openlineage
  • apache-airflow-providers-redis
  • apache-airflow-providers-sendgrid
  • apache-airflow-providers-sftp
  • apache-airflow-providers-slack
  • apache-airflow-providers-smtp
  • apache-airflow-providers-snowflake
  • apache-airflow-providers-ssh
  • apache-airflow-providers-standard
  • google-cloud-orchestration-airflow
  • cloudera-airflow-provider==2.4.0
  • cloudera-airflow-provider-awc==1.0.0

Hooks

While operators define the task, hooks act as the interface to external platforms. A hook abstracts the low-level API calls and connection details, allowing Cloudera Workflow Orchestrator to communicate with external systems such as databases, cloud providers, or APIs.

Hooks have the following key characteristics:
  • Centralized connections – Hooks use Connection IDs stored in the Airflow Metadata Database, eliminating the need to hardcode credentials in your DAGs.
  • Standardized methods – Many hooks share, for example, a SqliteHook or PostgresHook, common methods such as .get_records(), ensuring a consistent developer experience across different databases.
  • Efficiency – Hooks handle the boilerplate code for authentication and session management.
Cloudera Workflow Orchestrator supports the following Airflow hooks:
  • airflow.hooks.dbapi
  • airflow.hooks.filesystem
  • airflow.hooks.package_index
  • airflow.hooks.subprocess
Table 1. Operator compared to hook
Feature Operator Hook
Purpose Defines a single unit of work (a task). Defines how to connect to an external system.
Location Used directly within the DAG file. Usually called inside an Operator.
Scope High-level

Example: Run this SQL script

Low-level

Example: Open connection, run, close

Analogy The Worker performing a job. The tool the worker uses to perform the job.