Skip to main content

An Airflow plugin for interacting with IOMETE platform.

Project description

INTERROGATE

IOMETE Airflow Plugin

This Plugin helps to trigger/run Spark Jobs created in IOMETE platform.

Installation

This plugin could be easily installed with pip. Just run the following in your aiflow server:

pip install iomete-airflow-plugin

Restart you server and check the plugins page on Airflow's admin panel to make sure plugin loaded successfully.

Usage

Pass your IOMETE connection details directly to IometeOperator. A single Airflow instance can trigger jobs against multiple IOMETE clusters by passing different host/domain/access_token values per task.

from airflow import DAG
from iomete_airflow_plugin.iomete_operator import IometeOperator

dag = DAG(dag_id="...", default_args={}, schedule=None)

task = IometeOperator(
    task_id="random_task_id",
    job_id="1b0fc29b-5491-4c0a-94ea-48e304c3c72e",  # Spark Job ID or Name in IOMETE platform.
    host="https://YOUR.iomete.host",
    domain="YOUR_DOMAIN",
    access_token="YOUR_ACCESS_TOKEN",
    dag=dag,
)

To avoid repeating credentials on every task, put them in the DAG's default_args:

dag = DAG(
    dag_id="...",
    default_args={
        "host": "https://YOUR.iomete.host",
        "domain": "YOUR_DOMAIN",
        "access_token": "YOUR_ACCESS_TOKEN",
    },
    schedule=None,
)

Loading the access token from an Airflow Variable

If you store tokens as Airflow Variables (one per target IOMETE cluster), pass the Variable name via access_token_variable instead of the raw token. The plugin calls Variable.get at task-execute time, so different tasks can target different IOMETE clusters by naming different Variables. We recommend prefixing your Variable names with iomete_ to keep them grouped in Admin → Variables.

# Define an Airflow Variable named "iomete_prod_token" in Admin → Variables, then:
task = IometeOperator(
    task_id="run_on_prod",
    job_id="...",
    host="https://prod.iomete.com",
    domain="prod",
    access_token_variable="iomete_prod_token",
    dag=dag,
)

Specify either access_token or access_token_variable, never both. If the resolved Variable is unset or empty at execute time the task fails with a clear error.

Parameters

Parameter Type Required Default Description
job_id str yes Spark Job ID or name in the IOMETE platform.
host str yes IOMETE platform host URL.
domain str yes IOMETE domain identifier.
access_token str one of these two Personal access token, passed as a raw string.
access_token_variable str one of these two Name of an Airflow Variable holding the token. Resolved via Variable.get at execute time.
host_verify bool no True Verify the TLS certificate of the IOMETE host.

host, domain, and access_token_variable are Jinja-templatable. access_token is not templatable: Airflow persists rendered template fields to its metadata database and exposes them in the UI, so templating raw tokens would leak them. Use access_token_variable to template the lookup name instead.

Migrating from 2.x

The 2.x plugin read connection details from four Airflow Variables (iomete_host, iomete_access_token, iomete_domain, iomete_host_verify) and exposed a variable_prefix parameter to namespace them. Both are gone in 3.0.0. Pass host, domain, and either access_token or access_token_variable (and optionally host_verify) directly to IometeOperator. If you previously used variable_prefix, set access_token_variable to the full Airflow Variable name instead (e.g. access_token_variable="iomete_prod_token").

Resources

For more information check:

  1. Github repository
  2. IOMETE Docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iomete_airflow_plugin-3.0.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iomete_airflow_plugin-3.0.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file iomete_airflow_plugin-3.0.0.tar.gz.

File metadata

  • Download URL: iomete_airflow_plugin-3.0.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.4.0

File hashes

Hashes for iomete_airflow_plugin-3.0.0.tar.gz
Algorithm Hash digest
SHA256 ca1a8331da902b89f395cfcd339b56c9de15a661911d4223a48dcb17370e7481
MD5 b06a52ee6c6c439cc5e0b6dbc72e16d5
BLAKE2b-256 3fc20277daa67346c2d70e43fc7d86c40f41f2d2ec03ae6c9636de635003df06

See more details on using hashes here.

File details

Details for the file iomete_airflow_plugin-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for iomete_airflow_plugin-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f75105425708c9dd8e15dbd658dce1a8311cf1a941ffb492faf99b6926134382
MD5 9c0f4acc06da9fdfb8a6376692044f15
BLAKE2b-256 c3875f10be0717d0aaa9cb54fe32cb6ed46ccd26fcecfff6a07814287fd33da9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page