Skip to main content

Airflow Providers for Wherobots

Airflow providers to bring Wherobots Cloud's spatial compute to your data workflows and ETLs.

Compatibility

Apache Airflow Supported Notes
3.0 and later Yes Operators and hooks build on the Task SDK (airflow.sdk).
2.10, 2.11 Yes Airflow 2 is end-of-life upstream; plan your move to Airflow 3.
2.9 and earlier No

Python 3.10 to 3.12. The package does not install Airflow for you: it uses the Airflow (and apache-airflow-providers-common-sql) already in your environment.

Installation

If you use Poetry in your project, add the dependency with poetry add:

$ poetry add airflow-providers-wherobots

Otherwise, just pip install it:

$ pip install airflow-providers-wherobots

Create an http connection

Create a Connection in Airflow. This can be done from Apache Airflow's Web UI, or from the command-line. The default Wherobots connection name is wherobots_default; if you use another name you must specify that name with the wherobots_conn_id parameter when initializing Wherobots operators.

The only required fields for the connection are:

  • the Wherobots API endpoint in the host field;
  • your Wherobots API key in the password field.
$ airflow connections add "wherobots_default" \
    --conn-type "generic" \
    --conn-host "api.cloud.wherobots.com" \
    --conn-password "$(< api.key)"

Usage

Execute a Run on Wherobots Cloud

Wherobots allows users to upload their code (.py, .jar), execute it on the cloud, and monitor the status of the run. Each execution is called a Run.

The WherobotsRunOperator allows you to execute a Run on Wherobots Cloud. WherobotsRunOperator triggers the run according to the parameters you provide, and waits for the run to finish before completing the task.

Refer to the Wherobots Managed Storage Documentation to learn more about how to upload and manage your code on Wherobots Cloud.

Below is an example of WherobotsRunOperator

from airflow_providers_wherobots.operators.run import WherobotsRunOperator

from wherobots.db.region import Region
from wherobots.db.runtime import Runtime

operator = WherobotsRunOperator(
        task_id="your_task_id",
        name="airflow_operator_test_run_{{ ts_nodash }}",
        region=Region.AWS_US_WEST_2,
        runtime=Runtime.TINY_A10_GPU,
        run_python={
            "uri": "s3://wbts-wbc-m97rcg45xi/42ly7mi0p1/data/shared/classification.py"
        },
        dag=dag,
        poll_logs=True,
    )

Arguments

The arguments for the WherobotsRunOperator constructor:

  • region: str | Region: The Wherobots region where runs are hosted. Accepts a Region enum value (see wherobots.db.region.Region) or a raw string (a BYOC region is passed through as-is). Optional — when omitted, your organization's configured default region is used. Only set it to override that default.

  • name: str: The name of the run. If not specified, a default name will be generated.

  • runtime: str | Runtime: The runtime dictates the size and amount of resources powering the run. Accepts a Runtime enum value (see available values here) or a raw string. Optional — when omitted, your organization's configured default runtime is used.

  • version: str: The WherobotsDB version to use. Defaults to latest.

  • poll_logs: bool: If True, the operator will poll and Logger.info() the run logs until the run finishes. If False, the operator will not poll the logs, only track the status of the run.

  • polling_interval: The interval in seconds to poll the status of the run. The default value is 20.

  • timeout_seconds: int: This parameter sets a maximum run time (in seconds) to prevent runaway processes. If the specified value exceeds the Max Workload Alive Hours, the timeout will be capped at the maximum permissible limit. Defaults to 3600 seconds (1 hour).

  • run_python: dict: A dictionary with the following keys:

    • uri: str: The URI of the Python file to run.
    • args: list[str]: A list of arguments to pass to the Python file.
  • run_jar: dict: A dictionary with the following keys:

    • uri: str: The URI of the JAR file to run.
    • args: list[str]: A list of arguments to pass to the JAR file.
    • mainClass: str: The main class to run in the JAR file.
  • environment: dict: A dictionary with the following keys:

    • sparkDriverDiskGB: int: The disk size for the Spark driver.
    • sparkExecutorDiskGB: int: The disk size for the Spark executor.
    • sparkConfigs: dict: A dictionary of Spark configurations.
    • dependencies: list[dict]: A list of dependant libraries to install.
  • wait_post_run_logs_timeout_seconds: int: Maximum duration (in seconds) the system waits for logs to become queryable after job completion. The default value is 60 seconds.

    For more detailed information about the environment parameter, refer to Get Run Logs in the Wherobots Documentation.

The dependencies argument is a list of dictionaries. There are two types of dependencies supported.

  1. PYPI dependencies:
{
    "sourceType": "PYPI",
    "libraryName": "package_name",
    "libraryVersion": "package_version"
}
  1. FILE dependencies:
{
    "sourceType": "FILE",
    "filePath": "s3://bucket/path/to/dependency.whl"
}

The file types supported are .whl, .zip, and .jar.

Execute a SQL query

The WherobotsSqlOperator allows you to run SQL queries on the Wherobots cloud, from which you can build your ETLs and data transformation workflows by querying, manipulating, and producing datasets with WherobotsDB.

Refer to the Wherobots Documentation and this guidance to learn how to read data, transform data, and write results in Spatial SQL with WherobotsDB.

Refer to the Wherobots Apache Airflow Provider Documentation to get more detailed guidance about how to use the Wherobots Apache Airflow Provider.

Example

Below is an example Airflow DAG that executes a SQL query on Wherobots Cloud:

import datetime

from airflow import DAG
from airflow_providers_wherobots.operators.sql import WherobotsSqlOperator

from wherobots.db.region import Region
from wherobots.db.runtime import Runtime

with DAG(
    dag_id="example_wherobots_sql_dag",
    start_date=datetime.datetime.now(),
    schedule="@hourly",
    catchup=False
):
    # Create a `wherobots.test.airflow_example` table with 100 records
    # from the OMF `places_place` dataset.
    operator = WherobotsSqlOperator(
        task_id="execute_query",
        return_last=False,
        runtime=Runtime.TINY,
        region=Region.AWS_US_WEST_2,
        sql=f"""
        INSERT INTO wherobots.test.airflow_example
        SELECT id, geometry, confidence, geohash
        FROM wherobots_open_data.overture.places_place
        LIMIT 100
        """,
    )

Arguments

  • region: str | Region: The Wherobots Compute Region where the SQL query executions are hosted. Accepts a Region enum value from wherobots.db.region.Region or a raw string. Optional. When omitted, your organization's configured default region is used.
  • runtime: str | Runtime: The runtime dictates the size and amount of resources powering the run. Accepts a Runtime enum value (see available values here) or a raw string. Optional. When omitted, your organization's configured default runtime is used.
  • sql: str: The Spatial SQL query to execute.

Metadata

Release files for airflow-providers-wherobots 1.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for airflow-providers-wherobots 1.9.0
File Size Uploaded Provenance Actions
airflow_providers_wherobots-1.9.0.tar.gz 276.8 kB With provenance Details for airflow_providers_wherobots-1.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for airflow-providers-wherobots 1.9.0
File Interpreter ABI Platform Actions
airflow_providers_wherobots-1.9.0-py3-none-any.whl Python 3 none any Details for airflow_providers_wherobots-1.9.0-py3-none-any.whl

Total release size: 297.3 kB

Release files / airflow_providers_wherobots-1.9.0.tar.gz

Download URL airflow_providers_wherobots-1.9.0.tar.gz
Size 276.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1f071854be07ff90ff2311252dd606b7175ccc3778ae07c10eabf3c5084f3d2b
BLAKE2b-256 checksum
How to use checksums
d278a6d443286cdafb3c365e938cfd51fbd5e4e95e838a15d5275a18f566ee6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / airflow_providers_wherobots-1.9.0-py3-none-any.whl

Download URL airflow_providers_wherobots-1.9.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4efaba5bf867bfaf46d8ae57ec4a643c42f9ba1820f0d6a7a658d1d24517e22b
BLAKE2b-256 checksum
How to use checksums
16098e04e01576c2a7a91c62b81c744982dff5f6dee4391c5531e17f47de9642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for airflow-providers-wherobots 1.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for airflow_providers_wherobots-1.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page