Integrating Cloudera Workflow Orchestrator with Iceberg Catalog
Integrate Cloudera Workflow Orchestrator operators and hooks with an Iceberg
REST Catalog (such as Apache Polaris) to use Iceberg Catalog directly from Cloudera Workflow Orchestrator.
Previously, interacting with Iceberg tables from Cloudera Workflow Orchestrator
required routing commands through Hive or Impala SQL with
CdeTriggerRunOperator or submitting a Spark job with
CdeRunJobOperator. These approaches are still available.
Now, by leveraging the IcebergHook as part of the preinstalled
apache-airflow-providers-apache-iceberg package, you can
perform lightweight catalog and table operations directly from Cloudera Workflow Orchestrator tasks without executing Spark jobs
(CdeTriggerRunOperator) or SQL queries
(SQLExecuteQueryOperator).
Before configuring the Cloudera Workflow Orchestrator connection, ensure the
following external requirements are in place within your Iceberg service and storage
backend:
Iceberg REST Catalog service: A running instance
of an Iceberg REST API-compatible service (example, Apache Polaris).
Network access: Direct network access from Cloudera Workflow Orchestrator worker pods to the Iceberg Catalog REST API
endpoint.
Registered Iceberg Catalog: An active catalog
registered within the Iceberg service where namespaces and tables can be
managed. For information about creating Iceberg Catalogs, see Creating a Catalog in Apache
Polaris.
User privileges (RBAC): An authenticated
principal in the Iceberg service with sufficient privileges for your intended
operations such as creating namespaces or tables and reading or writing data.
For more information, see Role-Based Access Control in Apache
Polaris.
User credentials: OAuth credentials (Client ID
and Client Secret) for catalog authentication.
Object storage backend access: Object storage
credentials and IAM policies permitting read or write operations to the
underlying backend such as AWS S3.
Connection ID: Create a unique connection
identifier. For example, iceberg_default.
Connection Type: Select
Iceberg.
Description: Enter a description about the
connection.
Catalog URI: Enter the Iceberg REST Catalog API
endpoint URL. For example,
http://[***POLARIS-HOST***]:8181/api/catalog/v1.
Client ID: Enter the Iceberg OAuth authentication
client ID.
Client Secret: Enter the Iceberg OAuth
authentication client secret.
Extra Fields JSON: Enter the JSON key-value
configuration passed to
pyiceberg.catalog.load_catalog() in the text box.
For information about the key-value configuration passed to
pyiceberg.catalog.load_catalog(), see Connecting to a catalog.
The
Extra Fields JSON defines catalog
properties, storage implementations, and optional authentication
overrides for pyiceberg. For the complete list of
keys, see pyiceberg
configuration.
Create a DAG for your Cloudera Workflow Orchestrator and use the
previously created Cloudera Workflow Orchestrator connection in the
DAG.
Example,
The following DAG reads data from the example_table Iceberg
table in the example_namespace namespace using the
configured iceberg_default Iceberg connection.
import logging
from airflow import DAG
from airflow.decorators import task
from airflow.providers.apache.iceberg.hooks.iceberg import IcebergHook
from pendulum import datetime
logger = logging.getLogger(__name__)
iceberg_connection_id = "iceberg_default"
iceberg_namespace = "example_namespace"
iceberg_table_name = "example_table"
with DAG(
"iceberg_read_example",
start_date=datetime(2026, 1, 1),
catchup=False,
schedule=None,
description="Example DAG to list namespaces and read table data from Iceberg.",
tags=["iceberg"]
) as dag:
@task
def read_table():
hook = IcebergHook(iceberg_conn_id=iceberg_connection_id)
catalog = hook.get_conn()
# Fetch table
table = catalog.load_table(f"{iceberg_namespace}.{iceberg_table_name}")
df = table.scan().to_pandas()
# Print information about the table
logger.info(f"First few rows of the table:")
logger.info(df.head())
logger.info(f"Rows in the table: {df.shape[0]}")
read_table()