Skip to main content

18 posts tagged with "Apache Airflow"

Apache Airflow®, the Open-Source Platform to Write, Schedule and Monitor Data Pipelines as Python Code

View All Tags

Apache Airflow® Tutorial for Data Pipelines in Python — Part 1: Install Airflow and Run Your First Dag

· 19 min read
Jagdish Kumawat
Founder @ Dewiride

A data pipeline that runs on a timer is easy to start and hard to trust: did last night's run work, what did it do, and can it run again for the day it missed? Apache Airflow® is built to answer those questions. This series builds a real pipeline with it, step by step, on your own computer. In Part 1 you install Airflow, start it, and run your first Dag: a task that counts yesterday's earthquakes worldwide.

Fixed: "The HMAC key is 24 bytes long, which is below the minimum recommended length of 64 bytes for SHA512" in Apache Airflow®

· 7 min read
Jagdish Kumawat
Founder @ Dewiride

A fresh Apache Airflow® 3.4.0 installation printed the same warning four times while I signed in and ran one Dag: The HMAC key is 24 bytes long, which is below the minimum recommended length of 64 bytes for SHA512. The key in question is the secret Airflow signs its access tokens with, and the one it generates for you is too short. Here's how I traced it, and the one setting that fixes it.

Fixed: "Bundle 'dags-folder' path does not exist … This may cause DAG loading issues" in Apache Airflow®

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

The first start of Apache Airflow® in a new folder went fine until the Dag processor printed a warning: Bundle 'dags-folder' path does not exist, followed by Found 0 files. Nothing was broken yet, but Airflow had nowhere to look for Dags. The fix is one mkdir, and this post shows how I found that out.

How to Keep Apache Airflow® Files Out of Git with .gitignore

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

When AIRFLOW_HOME is your project folder, Apache Airflow® writes its own files next to your code: a settings file with generated secrets, a database, logs and a file with the admin password. None of them belong in Git, and two of them are secrets. A .gitignore keeps them out before your first commit. This guide writes one on Airflow 3.4.0 and checks that it works.

How to Check the Health of Apache Airflow® with the Health Endpoint

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

Apache Airflow® is several programs working together, and any one of them can stop while the UI still opens. The health endpoint answers one question for all of them: is each part alive? It needs no sign-in, so a script, a monitoring tool or you with curl can ask it. This guide asks it, and reads the answer field by field, on Airflow 3.4.0.

How to Get an Access Token for the Apache Airflow® REST API

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Apache Airflow® 3 has a REST API for everything the UI does: list Dags, trigger runs, read logs. Most of its endpoints refuse a request that doesn't prove who's asking. With the simple auth manager that airflow standalone uses, the proof is a JWT access token, which you get by posting a username and password to /auth/token. This guide gets one and uses it, on Airflow 3.4.0.

How to Read a Task Log in the Apache Airflow® UI

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Everything an Apache Airflow® task writes, through Python's logging or with a plain print(), ends up in that task's log. In the Airflow 3 UI, the log has numbered lines, collapsible groups and a filter by level. This guide opens one, finds a print() line that isn't where you'd expect it, and filters the log down to warnings, on Airflow 3.4.0.

How to Trigger a Dag from the Command Line with airflow dags trigger

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

The Apache Airflow® UI has a Trigger button, but the terminal is often quicker, and it's the way to start a Dag from a script. airflow dags trigger creates a run of a Dag, and airflow dags list-runs shows how it went. This guide triggers a one-task Dag with both, on Airflow 3.4.0, including the step that keeps the run from waiting forever.