Skip to main content

An Apache Airflow provider package for Datazone

Project description

Airflow Airflow

Airflow Datazone Provider

A provider package for Apache Airflow that provides a set of operators and hooks to interact with Datazone.

Installation

You can install this package using pip:

pip install airflow-datazone-provider

Usage

Creating a connection

To integrate with Datazone on Airflow, you can create a connection in the Airflow UI with the following parameters:

  • Conn Id: <your_conn_id>
  • Conn Type: Datazone
  • Host: <your_datazone_host>
  • API Key: <your_datazone_api_key>
  • Extra: Optional extra parameters in JSON format. For example, to specify a compute, you can use the following JSON:
{
    "compute": "XSMALL"
}

DatazoneRunExecutionOperator

The DatazoneRunExecutionOperator is an operator that allows you to run an execution on Datazone.

from airflow import DAG
from datazone_provider.operators.datazone_run_execution import DatazoneRunExecutionOperator
from datetime import datetime

dag = DAG(
    "my_dag",
    start_date=datetime(2021, 1, 1),
    schedule_interval=None
)

dz_task = DatazoneRunExecutionOperator(
    dag=dag,
    task_id="run_datazone_execution",
    conn_id="<your_conn_id>",
    pipeline_id="<your_pipeline_id>",
    run_config={
        "compute": "XSMALL",
        "env_vars": {
            "DEMO_KEY": "DEMO_VALUE"
        }
    }
)

dz_task

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

airflow_provider_datazone-1.0.1.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distribution

airflow_provider_datazone-1.0.1-py3-none-any.whl (12.1 kB view hashes)

Uploaded Python 3

Supported by

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