airflow

How to find the number of upstream tasks failed in Airflow?

狂风中的少年 提交于 2021-01-05 05:57:00
问题 I am having a tough time in figuring out how to find the failed task for the same dag run running twice on same day( same execution day ). Consider an example when a dag with dag_id=1 has failed on the first run (due to any reason lets say connection timeout maybe) and task got failed. TaskInstance table will contain the entry of the failed task when we try to query it. GREAT!! But, If I re-run the same dag(note that dag_id is still 1) then in the last task(it has the rule of ALL_DONE so

How to find the number of upstream tasks failed in Airflow?

倾然丶 夕夏残阳落幕 提交于 2021-01-05 05:50:45
问题 I am having a tough time in figuring out how to find the failed task for the same dag run running twice on same day( same execution day ). Consider an example when a dag with dag_id=1 has failed on the first run (due to any reason lets say connection timeout maybe) and task got failed. TaskInstance table will contain the entry of the failed task when we try to query it. GREAT!! But, If I re-run the same dag(note that dag_id is still 1) then in the last task(it has the rule of ALL_DONE so

How to find the number of upstream tasks failed in Airflow?

左心房为你撑大大i 提交于 2021-01-05 05:50:25
问题 I am having a tough time in figuring out how to find the failed task for the same dag run running twice on same day( same execution day ). Consider an example when a dag with dag_id=1 has failed on the first run (due to any reason lets say connection timeout maybe) and task got failed. TaskInstance table will contain the entry of the failed task when we try to query it. GREAT!! But, If I re-run the same dag(note that dag_id is still 1) then in the last task(it has the rule of ALL_DONE so

How to setup LDAP (RBAC) in Airflow?

狂风中的少年 提交于 2021-01-04 06:47:36
问题 The current issues I am having is that LDAP settings do not seem to work with Airflow. My current code does not produce a login screen nor are there logs in the docker container that shows it is attempting to connect to the LDAP server. I have attempted to follow these tutorials but they appear to do nothing (i.e. the webserver_config.py is not being used) TutorialOne TutorialTwo Any information regarding how the connection works would be greatly appreciated! webserver_config.py : import os

Airflow Scheduler with SQL Server backend and pyodbc

安稳与你 提交于 2021-01-04 05:26:05
问题 I have setup Airflow a SQL Server as backend (SQL Azure). Init DB is successful. I am trying to run a simple dag every 2 minutes. The dag has 2 tasks: print date sleep When it start the airflow scheduler, it creates tasks instances for both the tasks, the first one succeeds & the second one seems to be stuck in "running" state. Looking at scheduler logs, I see the following error repeatedly. [2019-01-04 11:38:48,253] {jobs.py:397} ERROR - Got an exception! Propagating... Traceback (most

Airflow Scheduler with SQL Server backend and pyodbc

大憨熊 提交于 2021-01-04 05:25:25
问题 I have setup Airflow a SQL Server as backend (SQL Azure). Init DB is successful. I am trying to run a simple dag every 2 minutes. The dag has 2 tasks: print date sleep When it start the airflow scheduler, it creates tasks instances for both the tasks, the first one succeeds & the second one seems to be stuck in "running" state. Looking at scheduler logs, I see the following error repeatedly. [2019-01-04 11:38:48,253] {jobs.py:397} ERROR - Got an exception! Propagating... Traceback (most

Airflow: Unable to access the AWS providers

巧了我就是萌 提交于 2021-01-03 06:56:24
问题 I'm trying to access the Airflow Providers, specifically the AWS providers, found here I'm building a docker image and installing Airflow using PIP and including the AWS subpackage in the install command. pip install 'apache-airflow[crypto,aws,celery,postgres,hive,jdbc,mysql,ssh]==1.10.9' \ However, i'm unable to access the Provider from Python. from airflow.providers.amazon.aws.hooks.glue import AwsGlueJobHook >>> from airflow.providers.amazon.aws.hooks.glue import * Traceback (most recent

Airflow: Unable to access the AWS providers

瘦欲@ 提交于 2021-01-03 06:52:08
问题 I'm trying to access the Airflow Providers, specifically the AWS providers, found here I'm building a docker image and installing Airflow using PIP and including the AWS subpackage in the install command. pip install 'apache-airflow[crypto,aws,celery,postgres,hive,jdbc,mysql,ssh]==1.10.9' \ However, i'm unable to access the Provider from Python. from airflow.providers.amazon.aws.hooks.glue import AwsGlueJobHook >>> from airflow.providers.amazon.aws.hooks.glue import * Traceback (most recent

How to pass parameters to Airflow on_success_callback and on_failure_callback

纵然是瞬间 提交于 2021-01-02 07:59:36
问题 I have implemented email alerts on success and failure using on_success_callback and on_failure_callback. According to Airflow documentation, a context dictionary is passed as a single parameter to this function. How can I pass another parameter to these callback methods? Here is my code from airflow.utils.email import send_email_smtp def task_success_alert(context): subject = "[Airflow] DAG {0} - Task {1}: Success".format( context['task_instance_key_str'].split('__')[0], context['task

How to pass parameters to Airflow on_success_callback and on_failure_callback

我的未来我决定 提交于 2021-01-02 07:54:28
问题 I have implemented email alerts on success and failure using on_success_callback and on_failure_callback. According to Airflow documentation, a context dictionary is passed as a single parameter to this function. How can I pass another parameter to these callback methods? Here is my code from airflow.utils.email import send_email_smtp def task_success_alert(context): subject = "[Airflow] DAG {0} - Task {1}: Success".format( context['task_instance_key_str'].split('__')[0], context['task