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.51.tar.gz
(17.8 kB
view hashes)
Built Distribution
Close
Hashes for airflow_commons-0.0.51-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80d9298c9b028e847978439e1ec357c9e9ad221038e13f2eef4932288f2cfe7f |
|
MD5 | c3997fdf5c16b1d750605d6ddb2d46ee |
|
BLAKE2b-256 | 64f613b0306f20e012ae8047ace0b2d94b9684d38ec66efa3c69eb25d7377dab |