Skip to main content

Common functions for airflow

Project description

airflow-commons

A python package that contains common functionalities for airflow

Installation

Use the package manager pip to install airflow-commons.

pip install airflow-commons

Modules

  • bigquery_operator: With this module you can manage your Google BigQuery operations.
  • mysql_operator: Using this module, you can connect to your MySQL data source and manage your data operations.
  • s3_operator: This operator connects to your s3 bucket and lets you manage your bucket.
  • glossary: This module consists of constants used across project
  • sql_resources: Template BigQuery and MySQL queries such as merge, delete, select etc. are located here.
  • utils: Generic methods like connection, querying etc. are implemented in this module.

Usage

  • Sample deduplication code works like:
from airflow_commons import bigquery_operator

bigquery_operator.deduplicate(
        service_account_file="path_to_file",
        start_date="01-01-2020 14:00:00",
        end_date="01-01-2020 15:00:00",
        project_id="bigquery_project_id",
        source_dataset="source_dataset",
        source_table="source_table",
        target_dataset="target_dataset",
        target_table="target_table",
        oldest_allowable_target_partition="01-01-2015 00:00:00",
        primary_keys=["primary_keys"],
        time_columns=["time_columns"],
        allow_partition_pruning=True,
    )

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

airflow-commons-0.0.71.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

airflow_commons-0.0.71-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file airflow-commons-0.0.71.tar.gz.

File metadata

  • Download URL: airflow-commons-0.0.71.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for airflow-commons-0.0.71.tar.gz
Algorithm Hash digest
SHA256 c9c94d358ea13ca16382c52a7cc9b8df72cd1b09609bd3ab99a229e222bc90e3
MD5 a06012d377b637661ea32358ac56bf27
BLAKE2b-256 05cdb5fe880d93bfaab1d8574a1c1abf527a5755ce12ac46de9376a3b79a1f0d

See more details on using hashes here.

File details

Details for the file airflow_commons-0.0.71-py3-none-any.whl.

File metadata

File hashes

Hashes for airflow_commons-0.0.71-py3-none-any.whl
Algorithm Hash digest
SHA256 6e93ec638b8760d4cf6111427c99e765b1cf661eb4bb8f6fdba4c130de5d67c8
MD5 7f809652b6d5a9c25ecdaa00f18e0a6a
BLAKE2b-256 4e43b54f44f7d2f3f4f577a744794188295f5166bc02c52964957b5ee9f13c8c

See more details on using hashes here.

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