11,976 questions
0
votes
0
answers
33
views
airflow does not obey AIRFLOW__CORE__HIDE_SENSITIVE_VAR_CONN_FIELDS=False and still masks passwords
I have an airflow podman on local which I have started with this command:
podman run -d --name airflow --network airflow-net --cpus 8 --memory 8192m -e AIRFLOW__CORE__EXECUTOR=LocalExecutor -e ...
0
votes
1
answer
27
views
How to trigger a downstream Airflow DAG only when specific tasks in another DAG succeed?
I’m using Apache Airflow 2.x and I want to trigger a downstream DAG only when specific tasks in an upstream DAG succeed.
Here’s the situation:
I have an upstream DAG: dag_A
Inside dag_A, I have ...
0
votes
1
answer
43
views
Add jinja template value with DateTime value
In an Airflow Dag file, I'm trying to handle following jinja template variables as DateTime values.
Specifically {{ data_interval_start }} and {{ data_interval_end }},
which (according to https://...
Best practices
0
votes
0
replies
42
views
How to manage (Google Cloud Composer) Airflow roles with infrastructure as code?
Are there any best practices for handling roles in code?
Most of our setup is managed via Terraform. It would be great if there was a possibility.
There is a Terraform provider, however using the ...
0
votes
0
answers
45
views
KubernetesPodOperator - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)
I’m running Apache Airflow inside a Docker container and trying to use the KubernetesPodOperator to run a simple “hello world” pod in an external Kubernetes cluster (not the same one where Airflow ...
0
votes
0
answers
30
views
Airflow 3 - Run LocalExecutor with unlimited Parallelism
Airflow Docs say that the LocalExecutor supports an "unlimited Parallelism". Source
They do not specify exactly how to run LocalExecutor in this mode, but I assume it is through the core....
0
votes
1
answer
112
views
Unable to use Airflow variable with function in Jinja template
I'm trying to pass Airflow logical_date to dbt model so that I can use it in the model (sql). I'm using Airflow 2.11.0. I'm doing below, but the dag couldn't get constructed, with an error says:
'...
-1
votes
1
answer
42
views
How to correctly use retry_delay or retry_delay_sec in Airflow YAML DAG?
I'm currently working with Apache Airflow and trying to configure retries for my DAG tasks using the retry_delay (or retry_delay_sec) parameter in a YAML-based DAG definition.
However, I'm running ...
0
votes
0
answers
48
views
Why do my BigQueryInsertJobOperator tasks in Cloud Composer show long queued durations before running?
I’m using Cloud Composer (Airflow) and have two BigQuery operators like this:
run_aggregation = BigQueryInsertJobOperator(
task_id='aggregation_task',
configuration={
"query":...
0
votes
0
answers
74
views
Unable to establish a connection with Azure Blob using Apache Airflow
I have created a DAG in Airflow that will detect a file in Azure blob storage. This is a sensor that will detect the existence of a blob in Azure blob storage.
But it is failing repeatedly with the ...
0
votes
0
answers
25
views
Airflow tasks for data without timestamps
I would like to use Airflow for some ETL operations, where the source data does not have (indexed) timestamp columns. The source data is a database table where new records of events are appended ...
0
votes
0
answers
75
views
Tasks stuck in queued
I’m running into an issue with Airflow 3.1 using CeleryExecutor inside Docker Compose, and I can’t figure out what’s wrong.
This is for a small project I’m building for my business. The idea is to use ...
1
vote
0
answers
96
views
Airflow 3.1. + CeleryExecutor in Docker Compose: DAGs stuck in `queued`, tasks never sent to workers
I’m trying to run Apache Airflow 3.1. with the CeleryExecutor using Docker Compose (together with Redis + Postgres).
My problem is, when I trigger a DAG (directly over the command line or how it's ...
0
votes
0
answers
68
views
Airflow Delay(?) - "Queued" - in execution and "ERROR - Error fetching the logs. Try number 0 is invalid."
I'm using a newer version of airflow (airflow:3.0.6) with docker compose. Essentially I have just copied and slightly modified the official docker-compose file provided by Airflow itself:
https://...
0
votes
0
answers
34
views
Grant permission to newly created DAGs directly during import
I am working on a platform allowing user to register DAGs to an airflow instance. Users upload the code for the DAGs they want to import along with a mapping of permission for roles on those DAGs.
My ...
0
votes
2
answers
80
views
How to access params string within a DAG run in Airflow?
I have a dag, which runs several sql scripts on certain tables. There are two options to run this dag:
On the production tables
On frozen archived tables
I want to be able to select which tables to ...
-1
votes
1
answer
73
views
Custom Airflow Image
I have Airflow running on Kubernetes.
So, as you know, every task is spun up as it's own pod by the KubernetesExecutor.
I have tried to override the individual container images with slim python images,...
2
votes
1
answer
253
views
How to clean database from DAG?
I want to periodically delete old XCom records (e.g. older than 15 days) from inside a DAG.
In Airflow 2 I could connect directly to the metadata DB, but in Airflow 3 direct DB access is no longer ...
0
votes
2
answers
102
views
Why is Airflow Bash operator not passing XCom to another operator?
I'm working on a task group that needs to pass a variable from a BashOperator to another BashOperator. Each bash operator is invoking Python, and the first Python script needs to return a string in a ...
0
votes
0
answers
62
views
Airflow backfill job randomly experiences error: Task state changed externally
I am using Google Cloud Composer environment and Apache Airflow to run my DAG.
Almost all tasks are run in deferrable mode, since they are long-running.
I noticed that when running a backfill job for ...
0
votes
0
answers
71
views
Access task level parameters of databricks job along with parameters passed by airflow job
I have a airflow DAG which calls databricks job that has a task level parameters defined as job_run_id (job.run_id) and has a type as python_script. When I try to access it using sys.argv and ...
-2
votes
2
answers
505
views
Airflow 3.0.0 : Rest API : Not authenticated
I am new to Airflow and was able to configure Airflow 3.0.0 with sample docker compose. It is up and running fine. I am able to login to UI and also run dags on UI.
I actually want to trigger DAG via ...
0
votes
0
answers
30
views
Apache Airflow: Ignore implicit TaskGroup when creating a task
I'm generating dynamically based on JSON files some DAGs.
I'm creating a WHILE loop system with TriggerDagRunOperator (with wait_for_completion=True), triggering a DAG which self-calls itself until a ...
0
votes
0
answers
52
views
Error loading data: 'Engine' object has no attribute 'cursor': chan="stdout": source="task"
I am trying to run a batch process using Apache Airflow. The Extract and Transform stages work very fine but the load stages is giving an error. Here is my code:
from airflow.decorators import dag, ...
0
votes
0
answers
78
views
Airflow ModuleNotFoundError: No module named 'pyarrow'
I'm trying Apache Airflow for the first time and built a simple ETL. But after loading the data and proceeding to the transform phase, it throws an error because it says pyarrow was not found. Im ...