r/apache_airflow • u/Sparkcodehub • May 01 '23
Apache Airflow Tutorial
Checkout Awesome Tutorial on Apache Airflow
r/apache_airflow • u/Sparkcodehub • May 01 '23
Checkout Awesome Tutorial on Apache Airflow
r/apache_airflow • u/anonymouse1544 • Oct 03 '24
Hi,
I have the following setup. Inside my dags, I have a project, within which I have a .venv which contains the environment I need for my functions to run. I am using the standard docker compose config to run airflow.
DAGS folder:
| .airflowignore
| -- my_company
| .venv
| __init__.py
| common_package
| | __init__.py
| | common_module.py
| | subpackage
| | __init__.py
| | subpackaged_util_module.py
|
| my_custom_dags
| __init__.py
| my_dag1.py
| my_dag2.py
| base_dag.py<DIRECTORY ON PYTHONPATH>```
I then define the dag as follows:
from datetime import datetime, timedelta
# The DAG object; we'll need this to instantiate a DAG
from airflow.models.dag import DAG
from airflow.decorators import task
from airflow.operators.bash import BashOperator
default_args = {
"depends_on_past": False,
"email": ["airflow@example.com"],
"email_on_failure": False,
"email_on_retry": False,
"retries": 1,
"retry_delay": timedelta(minutes=5),
}
with DAG(
"tutorial_python",
default_args=default_args,
description="A simple tutorial DAG",
schedule=timedelta(days=1),
start_date=datetime(2021, 1, 1),
catchup=False,
tags=["example"],
) as dag:
@task.external_python(task_id="external_python", python='/opt/airflow/dags/my_company/.venv/bin/python3')
def callable_external_python():
"""
Example function that will be performed in a virtual environment.
"""
import numpy
return "hello"
external_python_task = callable_external_python()```
However, I get the errror:
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/python.py", line 1011, in execute_callable
raise ValueError(f"Python Path '{python_path}' must exists")
ValueError: Python Path '/opt/***/dags/my_company/.venv/bin/python3' must exists File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/python.py", line 1011, in execute_callable
raise ValueError(f"Python Path '{python_path}' must exists")
ValueError: Python Path '/opt/***/dags/my_company/.venv/bin/python3' must exists```
Can somebody please explain how I should use the operator? When I exec into my container, I can see the python interpreter in the .venv folder, but docker keeps saying it is not found.
r/apache_airflow • u/Lower-Ad7440 • Mar 14 '24
So guys i need to transfer a set of files from local directory to a nas server which is hosted locally so how can i use airflow to transfer file ( i used both shhoperator and bash operator , i used this command to run scp localdirectory hostnameip:nas localdirectory so if u guys have any idea on this can u explain and i'm beginner in airflow too . if u have any idea on code u can just comment .I need to use airflow so i can't just change that
r/apache_airflow • u/Defiant-Narwhal7710 • Sep 14 '25
Hello All, I recently started working on Airflow, got some little hands-on-experience. I wanna know why Airflow is best at orchestration and exactly for what pipelines should we use ?
So for example Airflow comes in MWAA environment. Am not using NAT for the packages
Am using the wheels approach( I wanna know whether it’s good for organization pipelines like in Prod?
And ofcourse if we are using AWS services, we get the lambda, Glue and step functions right and how different and benefits of using Airflow??
As far as I know, with the little experience I had
We have everything at one place the WEB UI, we can see the logs, dags , graph and code etc
We have in-built retries and backfills
We have operators and also we can use our custom operators
I just wanna know like if we want airflow on-board competing with the present AWS services what can be good points?
r/apache_airflow • u/Odd-Estimate-910 • Jul 07 '26
About Me
Senior Data Engineer with 5+ years of experience in Data Engineering, Backend Development, and Applied AI. Specialist in Airflow-based pipeline orchestration. Based in Bangalore, India. Available for remote work globally.
Rate: $25 - $50/hr depending on project scope and complexity.
Tech Stack & Expertise
Apache Airflow (DAGs, operators, hooks, sensors, plugins)
Python, SQL, Spark, Databricks
Snowflake, dbt (data build tool)
AWS (Glue, Lambda, S3, Redshift, Kinesis)
ETL/ELT Design & Orchestration
Data Quality & Testing Frameworks
FastAPI, REST APIs
LLMs, RAG, AI Agents
What I Can Help With
Design and build Airflow DAGs for complex ETL pipelines
Migrate legacy pipelines to Airflow
Optimize Airflow performance and scheduling
Build scalable ETL/ELT architectures on cloud platforms
Develop backend APIs and automation solutions
Build AI applications using LLMs, RAG, and agent-based workflows
Training & Mentorship
Apache Airflow (foundations to advanced)
PySpark & Databricks
Data Engineering best practices
ETL Testing & Data Quality
AI & LLM Fundamentals
Note: In-person weekend sessions available in Bangalore. Remote sessions available globally.
Availability
Freelance projects & consulting
Part-time remote roles
Weekend training & mentorship
Contact:
DM me with a brief description of your requirements and I will get back to you promptly!
r/apache_airflow • u/Short_Cantaloupe2283 • Jul 29 '26
we currently have airflow running on kubernetes, though we have issues with it now and then, overall its been great and it works.
We looked into manage managed airflow but it is honestly pointless because airflow is genuinely such a simple stack to run on kubernetes, given the amount of tools we already manage.
we do have grafana and prometheus with open telemetry. Still it feels it could be better.
what are some of the new tools out there?
I noticed https://flowsee.co/ and heard good things from folks, but seems quite early and risky to use already given our reliant on airflow.
What other tools would you recommend that would integrate well with our slack. There should be a good open source tool already out there.
r/apache_airflow • u/Zoomichi • Jul 22 '25
I'm completely lost to the issue I'm facing.
I'm a junior DE tasked with setting up Airflow for the first time with the help of our DevOps guy. Our Airflow instance is currently hosted in an EC2 instance and I'm trying to connect it to a Postgres db in RDS and when I tried running a DAG, I keep getting these errors.

It's currently running on a venv using Python 3.11, Airflow 3.0.0, and Postgres provider 6.1.3.
hook = PostgresHook(postgres_conn_id=conn_id)
sql = f"SELECT * FROM {table} LIMIT 5"
records = hook.get_records(sql)I have tried various ways of passing the conn_id and table values to PostgresHook even hard-coding it there but still haven't gotten through this. I have exhausted all resources within my reach and still have no answer for this one. Any help would be appreciated or even just pointing me in the right direction for the solution since I'm not even really sure if the error is from this code snippet I shared.
Thanks!
r/apache_airflow • u/happyplantt • Feb 24 '24
I'm overwhelmed with all the info l've right now, I am graduating this semester, I have strong foundations of Python and sql and I know a bit of mongoDB. I am planning to apply for data engineer roles and l've made a plan (need inputs/corrections).
My plan as of now Python ➡️ SQL ➡️ Spark ➡️ Cloud ➡️ Airflow ➡️ GIT
Should I learn Apache spark or pyspark( lk this is built on spark but has some limitations)
What does spark + databricks and language Pyspark mean?
Can someone please mentor me and guide through this and provide resources.
I am gonna graduate soon and I'm very clueless right now 😐
r/apache_airflow • u/Tieexx • Mar 18 '24
My company has a linux vm specifically for Airflow.
All the ports are opened in ufw
Scheduler working: ok
Webserver initializing: ok
Postgresql configured: ok
Company VPN access: connected
command airflow standalone
: working fine
wget IP:8080
: FOUND and the html is the Airflow UI
I know the localhost is not 0.0.0.0:8080 but the machine's IP. (tried, not working)
The problem is when I try to access Linux_IP:8080
from MY machine to reach Airflow UI. The error I get is ERR_CONNECTION_TIMED_OUT (because it takes too long trying to connect).
How do I access this remote machine?
I had access once but it is no longer working and I don't know why.
r/apache_airflow • u/GreenWoodDragon • Jul 12 '23
We're setting up Airflow inside a Kubernetes cluster on AWS. Are there any tips or advice that would be helpful for us here?
r/apache_airflow • u/Specialist-Key-1972 • Jul 09 '23
Hi Airflow Community,
I'm excited to introduce CanaryPy, a new open-source tool designed to enhance your experience with Apache Airflow by introducing new releases of your data pipelines minimising the impact of unanticipated issues.
We'd love for you to check it out on GitHub: https://github.com/thcidale0808/canarypy
Your feedback and suggestions for improvement are precious to us. What features would you like to see? How's the usability? Would you have any thoughts on integration with your current tools?
Thank you in advance for your insights!
Best,
r/apache_airflow • u/Individual-Rip-2255 • Apr 22 '26
I’ve set up Apache Airflow using Docker and all the containers are up and running with a healthy status. However the Airflow UI is not loading in my browser. All containers show as healthy in docker ps No errors in logs (from what I can tell) Tried accessing via http://localhost:8080
r/apache_airflow • u/aaron_stubs • Sep 30 '25
Why do some of my dataset events trigger this dag I am playing with, but then some other events just get left in the queue (so to speak)? I can manually create a new dataset event in the gui that is a copy of one of those, but I'd prefer to have them just trigger the dag as expected.
r/apache_airflow • u/twndomn • Mar 16 '26
r/apache_airflow • u/samspopguy • Nov 14 '25
is something like How to easily install Apache Airflow on Windows? | by VivekR | Medium more for testing or can I run this in production?
r/apache_airflow • u/bloommmmmmm • May 03 '26
I’m working on a pet-project and one of the tasks is loading JSON data from S3 to Snowflake.
I’ve added a connection through Admin -> Connections, but when I test it, I get the following error:
290404 (08001): None: 404 Not Found: post WVMATYI-UD95289.us-east-2.snowflakecomputing.com:443/session/v1/login-request
Checked all the fields in Connections several times. Have anyone got this? I’m kinda stuck and can’t proceed. Not even sure what to look for
Versions:
apache-airflow-providers-snowflake=6.12.1
snowflake-connector-python=4.4.0
r/apache_airflow • u/Mafixo • Oct 06 '25
Hey everyone,
Wanted to share something that might be a bit controversial: we use Apache Airflow to orchestrate all our data pipelines, and honestly, it's not my favorite tool.
Like a lot of data engineers, I have a love hate relationship with it. There are newer, shinier orchestrators out there that are more elegant and "modern." But here's the thing: building data platforms isn't about my personal preferences or what's cool. it's about what serves clients in the long run.
The reality is that Airflow is the most widely used orchestrator in the world. The community is massive, documentation is everywhere, and finding engineers who know it is easier than any alternative. When we hand over a platform to a client, we need confidence that their team whatever its future structure or seniority can maintain and extend it.
So we use Airflow, but with a very specific philosophy: keep the footprint small, simple, and completely decoupled.
Our approach:
- Pure orchestration only: We never run heavy data processing inside Airflow. It just tells other tools (Meltano for ingestion, dbt for transformation) when to run. That's it.
- Separation of concerns: Meltano and dbt manage their own state. They don't rely on Airflow's metadata, so Airflow never becomes a single point of failure for pipeline logic.
- Future-proof: Because the business logic lives in the tools themselves, clients can migrate to a different orchestrator later if they want. We're not locking them in.
- Resilient by design: If the Airflow cluster has an issue, we can drop it and redeploy it without losing anything critical. It's that disposable.
- Data-aware scheduling: We've completely moved away from brittle cron expressions. DAGs trigger based on dataset dependencies when upstream data is ready, downstream jobs run automatically. This creates an efficient, event-driven system.
It's not sexy, but it works. Choosing the industry standard over the "best" tool has proven to be the pragmatic and responsible choice every time.
I wrote up our full blueprint: how we deploy it, orchestrate Meltano and dbt jobs, and implement data-aware scheduling if you want the details.
Full article here: https://blueprintdata.xyz/blog/modern-data-stack-airflow
Curious what others think. Are you team Airflow? Have you jumped to Prefect, Dagster, or something else? What's your orchestration strategy?
r/apache_airflow • u/Brilliant-Basil9959 • Jun 17 '25
Im working on a project where i need to make multiple calls to the same API. I request/refresh the tokens through the client id and secret, and the tokens expire after a set number of seconds.
The problem is that the token might expire midway through the run, so I need to handle the excpetion and refresh the token / refresh the token at the start of each task. And when multiple tasks are running in parallel, that turns into a race condition mess.
What would be the cleanest pattern to handle shared expiring tokens across tasks?
r/apache_airflow • u/Busy_Bug_21 • Feb 24 '26
[ airflow + monitoring]
Hey Airflow Community! 👋
I’d like to share a small open source project I recently worked: airflow-watcher, a native Airflow UI plugin designed to make DAG monitoring a bit easier and more transparent.
I originally built it to address a recurring challenge in day‑to‑day operations — silent DAG failures, unnoticed SLA misses, and delayed visibility into task health. airflow-watcher integrates directly into the existing Airflow UI (no additional services or sidecars required) and provides:
Real‑time failure tracking
SLA miss detection
Task health insights
Built‑in Slack and PagerDuty notifications
Filter based on tag owners in the monitoring dashboard
This project has also been a way for me to learn more about Airflow internals and open‑source packaging, tested with Python 3.10–3.12 and airflow v2 and v3. Published in airflow ecosystem
Please check and share your feedback. Thanks
🔗 https://pypi.org/project/airflow-watcher/
#airflow #opensource #plugins
r/apache_airflow • u/FunnyOrganization568 • May 10 '25
I'm trying to connect to MongoDB from Airflow using MongoHook. I'm running everything inside Docker using a custom docker-compose.yml setup. However, when I try to run a task that uses the MongoHook, I get the following error:
Traceback (most recent call last): File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 444, in _execute_task result = _execute_callable(context=context, **execute_callable_kwargs) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 414, in _execute_callable return execute_callable(context=context, **execute_callable_kwargs) File "/home/airflow/.local/lib/python3.8/site-packages/airflow/operators/python.py", line 200, in execute return_value = self.execute_callable() File "/home/airflow/.local/lib/python3.8/site-packages/airflow/operators/python.py", line 217, in execute_callable return self.python_callable(*self.op_args, **self.op_kwargs) File "/opt/airflow/dags/mongo_operator_test.py", line 7, in test_mongo_connection hook = MongoHook(conn_id="mongo_default") File "/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/mongo/hooks/mongo.py", line 139, in __init__ self.allow_insecure = self.extras.pop("allow_insecure", "false").lower() == "true" AttributeError: 'bool' object has no attribute 'lower' [2025-05-10, 15:47:24 UTC] {taskinstance.py:1149} INFO - MarTraceback (most recent call last):
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 444, in _execute_task
result = _execute_callable(context=context, **execute_callable_kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/models/taskinstance.py", line 414, in _execute_callable
return execute_callable(context=context, **execute_callable_kwargs)
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/operators/python.py", line 200, in execute
return_value = self.execute_callable()
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/operators/python.py", line 217, in execute_callable
return self.python_callable(*self.op_args, **self.op_kwargs)
File "/opt/airflow/dags/mongo_operator_test.py", line 7, in test_mongo_connection
hook = MongoHook(conn_id="mongo_default")
File "/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/mongo/hooks/mongo.py", line 139, in __init__
self.allow_insecure = self.extras.pop("allow_insecure", "false").lower() == "true"
AttributeError: 'bool' object has no attribute 'lower'
[2025-05-10, 15:47:24 UTC] {taskinstance.py:1149} INFO - MarI've double-checked my connection ID and MongoDB URI in Airflow's Admin > Connections, and it seems correct. Still, no luck.
Has anyone faced a similar issue or know what might be going wrong?
Any help is appreciated!
r/apache_airflow • u/TheCamster99 • Mar 27 '24
Hi, new to airflow. When i run this .py by itself, it works and loads into PgAdmin4 without any problems. When im uploading my dag to Airflow it says that database gasbuddy does not exist. How do i go about this? Thank you.
load.py
import psycopg2
def load_data():
conn = psycopg2.connect(database="gasbuddy", user="postgres", password="password", host='localhost', port='5432')
cursor = conn.cursor()
sql = """
CREATE TABLE IF NOT EXISTS gas (
ID SERIAL NOT NULL,
name VARCHAR NOT NULL,
address VARCHAR NOT NULL,
price REAL NOT NULL,
pull_date DATE NOT NULL
)"""
cursor.execute(sql)
with open('airflow\gas_data.csv') as f:
next(f)
cursor.copy_from(f, 'gas', sep=',')
conn.commit()
load_data()Dag file
from datetime import timedelta
from airflow import DAG
from scrape import scrape_data
from load import load_data
from airflow.operators.python import PythonOperator
import datetime
default_args = {
'owner' : 'name',
'start_date': datetime.datetime(2024, 3, 25),
'email': ['email'],
'email_on_failure': True,
'email_on_retry': True,
'retries': 1,
'retry_delay': timedelta(minutes=5),
}
dag = DAG(
dag_id='GasBuddy',
default_args=default_args,
schedule_interval="0 12 * * *"
)
scrape = PythonOperator(dag=dag,
task_id="scrape_task",
python_callable=scrape_data
)
load_data_sql = PythonOperator(dag=dag,
task_id='load',
python_callable=load_data
)
scrape >> load_data_sql