Integrating Cloudera Workflow Orchestrator with Ozone

Create a connection to Ozone in Cloudera Workflow Orchestrator. Cloudera Workflow Orchestrator includes a preinstalled Amazon (AWS) provider which enables basic interaction with S3-compatible storage endpoints like Apache Ozone or AWS S3.

For information about Amazon Web Services operator, see Amazon S3 operator documentation.
  • An existing Ozone storage service (for example, Cloudera Object Store in AWC).
  • An Access Key and Secret Key for the Ozone S3 Gateway.
  1. Sign in to Cloudera Workflow Orchestrator from Anywhere Cloud Console.
  2. Click Admin > Connections > Add Connection.
  3. Add the following configurations:
    • Connection ID: Create a unique connection identifier. For example, ozone_default.
    • Connection Type: Select Amazon Web Services.
    • Description: Enter a description about the connection.
    • AWS Access Key ID: Enter your Ozone Access Key. The default value for Cloudera Object Store is ozone.
    • AWS Secret Access Key: Enter your Ozone Secret Key. The default value for Cloudera Object Store is ozone.
    • Extra Fields JSON: Enter the JSON configuration for the Ozone endpoint URL based on your Cloudera Runtime version.
      • Cloudera Runtime 7.1.9 or 7.3.1:
        {
          "endpoint_url": "https://[***OZONE_S3_GATEWAY_URL***]", 
          "config_kwargs": {
            "request_checksum_calculation": "when_required",
            "response_checksum_validation": "when_required"
          }
        }
      • Cloudera Runtime 7.3.2 or higher:
        {"endpoint_url": "https://[***OZONE_S3_GATEWAY_URL***]"}

      If you deployed your Cloudera Workflow Orchestrator cluster with a Cloudera Base on premises connector, include the truststore path ("verify": "/etc/cdp-base-connector/tls-pem/truststore.pem") inside config_kwargs.

      Example,

      {
        "endpoint_url": "https://[***OZONE_S3_GATEWAY_URL***]", 
        "config_kwargs": {
          "request_checksum_calculation": "when_required",
          "response_checksum_validation": "when_required",
          "verify": "/etc/cdp-base-connector/tls-pem/truststore.pem"
        }
      }

      For additional options such as SSL verification or region configuration, see the Airflow AWS Connection documentation.

  4. Click Save.
  5. Create a DAG for your Cloudera Workflow Orchestrator and use the previously created Cloudera Workflow Orchestrator connection in the DAG.

    Example,

    The following example DAG demonstrates how standard Airflow S3 operators upload a local file to an existing Ozone bucket and read its content.

    from datetime import datetime
    from airflow import DAG
    from airflow.decorators import task
    from airflow.providers.amazon.aws.hooks.s3 import S3Hook
    from airflow.providers.amazon.aws.transfers.local_to_s3 import LocalFilesystemToS3Operator
    
    with DAG(
        dag_id="ozone_example",
        schedule=None,
        start_date=datetime(2026, 1, 1),
        catchup=False,
        tags=["ozone", "s3"],
    ) as dag:
        connection_id = "ozone_default"
        bucket_name = "my-bucket"
        remote_filepath = "tmp/destination_file.txt"
        local_filepath = "local_file.txt"  
    
        # 1. Upload a file to Ozone from local disk
        upload_file = LocalFilesystemToS3Operator(
            task_id="upload_file",
            filename=local_filepath,
            dest_key=remote_filepath,
            dest_bucket=bucket_name,
            aws_conn_id=connection_id,
            replace=True
        )
        
        # 2. Read file's content
        @task
        def read_s3_content(bucket: str, key: str, conn_id: str):
            # In the future "S3ReadObjectOperator" can be used instead of "S3Hook" when available
            hook = S3Hook(aws_conn_id=conn_id)
            content = hook.read_key(key=key, bucket_name=bucket)
    
            # Printing the content of the file stored in Ozone
            print(f"--- File Content Start ---\n{content}...\n--- File Content End ---")
            return content
        
        read_content_task = read_s3_content(
            bucket=bucket_name,
            key=remote_filepath,
            conn_id=connection_id
        )
        
        # Define task dependencies (order of execution)
        upload_file >> read_content_task