-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Closed
Labels
kind:bugThis is a clearly a bugThis is a clearly a bug
Description
Apache Airflow version: 1.10.10
Environment:
- Cloud provider or hardware configuration:
- OS: Debian GNU/Linux 10 (buster)
- Kernel: Linux b62a643fb26c 4.9.184-linuxkit Improving the search functionality in the graph view #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 GNU/Linux
- Install tools: pip
What happened:
I tried to use ThresholdCheckOperator:
check_amount_value = ThresholdCheckOperator(
task_id='check_amount_value',
sql='SELECT MAX(amount) FROM interaction WHERE interaction_date=CURRENT_DATE',
max_threshold=1500,
min_threshold=1100,
conn_id=CONN_ID
)
I caught such error:
[2020-06-15 13:49:25,639] {taskinstance.py:1145} ERROR - 'int' object is not subscriptable
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 983, in _run_raw_task
result = task_copy.execute(context=context)
File "/usr/local/lib/python3.7/site-packages/airflow/operators/check_operator.py", line 375, in execute
result = hook.get_first(self.sql)[0][0]
TypeError: 'int' object is not subscriptable
What you expected to happen:
I expected that the check will be passed without any error.
How to reproduce it:
Here is the dockerized application, where I played around with all available checks. All check operators work correctly except ThresholdCheckOperator.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind:bugThis is a clearly a bugThis is a clearly a bug