Skip to main content

Airflow Fakefill Marker

Due to migrating to Kubernetes-host Airflow and using different backend, we need to find out a way to fill out all the history since its starting date for thousands of dags. To make this process going faster and easier, in the meantime, I didn't find this kind of tool on Github, so I implement this simple tool to help with marking dags as success. Hope it can also help others.

Installations

Method 1

$ pip install fakefill

Method 2

$ pip install git+https://git@github.com/benbenbang/airflow_fastfill.git

Method 3

$ git clone git@github.com:benbenbang/airflow_fastfill.git
$ cd airflow_fastfill
$ pip install .

Usages

$ fakefill

It takes 1 of 2 required argument, and 6 optional arguments. You can also define them in a yaml file and pass to the cli.

  • Options

    • Required [1 / 2]:

      • dag_id [-d][reqired]: can be a real dag id or "all" to fill all the dags
      • config_path [-cp][choose one]: path to the config yaml
    • Optional:

      • start_date [-sd]: starting date, default will be counted from 365 days ago
      • maximum_day [-md]: maximum fill date per dag, rangint: [1, 180]
      • maximum_unit [-mu]: maxium fill unit per dag, rangint: [1, 43200]
      • ignore [-i]: still procceed auto fill even the dag ran recently
      • pause_only [-p]: pass true to fill dags which are pause
      • confirm [-y]: pass true to bypass the prompt if dag_id is all
      • traceback [-v]: pass print our Airflow Database error

Examples

Fill all the dags for the past 30 days without prompt, and only fill if all the dags which have status == pause

$ fakefill -d all -p -md 30 -y

Run fastfill for dag id == dag_a by counting default fakefill days == 365

$ fakefill -d dag_a

Run fastfill with config yaml

$ fakefill -cp config.yml

The yaml file needs to be defined with two dictonary types: dags and settings. For dags section, it needs to be a list, while the settingssection is dict

Sample:

dags:
  - dag_a
  - dag_b
  - dag_c

settings:
  start_date: 2019-01-01
  maximum: "365"
  traceback: false
  confirm: true
  pause_only: true

Metadata

Release files for fakefill 1.0.1

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

Source distribution (sdist)

Source distribution for fakefill 1.0.1
File Size Uploaded Provenance Actions
fakefill-1.0.1.tar.gz 13.3 kB Without provenance Details for fakefill-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fakefill 1.0.1
File Interpreter ABI Platform Actions
fakefill-1.0.1-py3-none-any.whl Python 3 none any Details for fakefill-1.0.1-py3-none-any.whl

Total release size: 28.4 kB

Release files / fakefill-1.0.1.tar.gz

Download URL fakefill-1.0.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cf3d1f984d8d253df19d72000a4a254726b36d4fe74a7f33a635dbead014e930
BLAKE2b-256 checksum
How to use checksums
1a61365de288c8cd0b0067aca88b7374fdbaa9f74ab1fba1f6cd3c8fa79fb50a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.3.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release files / fakefill-1.0.1-py3-none-any.whl

Download URL fakefill-1.0.1-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aea106e4c6d3a4b4394607d41e61ec32e6fbf67a396d9b3dd396d667b65c0647
BLAKE2b-256 checksum
How to use checksums
69a7852c3027463b6bf6f98b4cd4a7a224e1d67011e827ddfd3294ef50b8eae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.3.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Security for fakefill 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.0.1 This release

2 release files No 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