vipulneo opened a new issue, #25784:
URL: https://github.com/apache/airflow/issues/25784
### Apache Airflow Provider(s)
trino
### Versions of Apache Airflow Providers
apache-airflow-providers-amazon==4.0.0
apache-airflow-providers-celery==3.0.0
apache-airflow-providers-cncf-kubernetes==4.1.0
apache-airflow-providers-common-sql==1.0.0
apache-airflow-providers-docker==3.0.0
apache-airflow-providers-elasticsearch==4.0.0
apache-airflow-providers-ftp==3.0.0
apache-airflow-providers-google==8.1.0
apache-airflow-providers-grpc==3.0.0
apache-airflow-providers-hashicorp==3.0.0
apache-airflow-providers-http==3.0.0
apache-airflow-providers-imap==3.0.0
apache-airflow-providers-microsoft-azure==4.0.0
apache-airflow-providers-mysql==3.0.0
apache-airflow-providers-odbc==3.0.0
apache-airflow-providers-postgres==5.0.0
apache-airflow-providers-redis==3.0.0
apache-airflow-providers-sendgrid==3.0.0
apache-airflow-providers-sftp==3.0.0
apache-airflow-providers-slack==5.0.0
apache-airflow-providers-sqlite==3.0.0
apache-airflow-providers-ssh==3.0.0
apache-airflow-providers-trino==4.0.0
### Apache Airflow version
2.3.3
### Operating System
MacOs 12.5
### Deployment
Docker-Compose
### Deployment details
-------DockerFile---------
FROM apache/airflow:2.3.3
COPY requirements.txt .
RUN pip install -r requirements.txt
---------Docker compose changes------------------
# image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.3.3}
build: .
--------------------requirements.txt----------------------------------
apache-airflow-providers-trino
--------------Docker commands------------------------
docker-compose build
docker-compose up
### What happened
Task fails with the below error:
*** Reading local file:
/opt/airflow/logs/dag_id=md_ca_sync/run_id=scheduled__2022-08-16T13:00:00+00:00/task_id=task_1/attempt=4.log
[2022-08-18, 06:08:32 UTC] {taskinstance.py:1179} INFO - Dependencies all
met for <TaskInstance: md_ca_sync.task_1 scheduled__2022-08-16T13:00:00+00:00
[queued]>
[2022-08-18, 06:08:32 UTC] {taskinstance.py:1179} INFO - Dependencies all
met for <TaskInstance: md_ca_sync.task_1 scheduled__2022-08-16T13:00:00+00:00
[queued]>
[2022-08-18, 06:08:32 UTC] {taskinstance.py:1376} INFO -
--------------------------------------------------------------------------------
[2022-08-18, 06:08:32 UTC] {taskinstance.py:1377} INFO - Starting attempt 4
of 4
[2022-08-18, 06:08:32 UTC] {taskinstance.py:1378} INFO -
--------------------------------------------------------------------------------
[2022-08-18, 06:08:32 UTC] {taskinstance.py:1397} INFO - Executing
<Task(TrinoOperator): task_1> on 2022-08-16 13:00:00+00:00
[2022-08-18, 06:08:32 UTC] {standard_task_runner.py:52} INFO - Started
process 157 to run task
[2022-08-18, 06:08:32 UTC] {standard_task_runner.py:79} INFO - Running:
['***', 'tasks', 'run', 'md_ca_sync', 'task_1',
'scheduled__2022-08-16T13:00:00+00:00', '--job-id', '10', '--raw', '--subdir',
'DAGS_FOLDER/md_ca_rawmsgsync.py', '--cfg-path', '/tmp/tmpn5174flq',
'--error-file', '/tmp/tmp7714i9ds']
[2022-08-18, 06:08:32 UTC] {standard_task_runner.py:80} INFO - Job 10:
Subtask task_1
[2022-08-18, 06:08:32 UTC] {task_command.py:371} INFO - Running
<TaskInstance: md_ca_sync.task_1 scheduled__2022-08-16T13:00:00+00:00
[running]> on host c48e6517a873
[2022-08-18, 06:08:33 UTC] {taskinstance.py:1591} INFO - Exporting the
following env vars:
AIRFLOW_CTX_DAG_OWNER=***
AIRFLOW_CTX_DAG_ID=md_ca_sync
AIRFLOW_CTX_TASK_ID=task_1
AIRFLOW_CTX_EXECUTION_DATE=2022-08-16T13:00:00+00:00
AIRFLOW_CTX_TRY_NUMBER=4
AIRFLOW_CTX_DAG_RUN_ID=scheduled__2022-08-16T13:00:00+00:00
[2022-08-18, 06:08:33 UTC] {trino_operator.py:39} INFO - Creating Trino
connection
[2022-08-18, 06:08:33 UTC] {trino_operator.py:48} INFO - Executing single
sql statement
[2022-08-18, 06:08:33 UTC] {taskinstance.py:1909} ERROR - Task failed with
exception
Traceback (most recent call last):
File "/opt/airflow/plugins/trino_operator.py", line 50, in execute
return hook.get_first(sql, parameters=self.parameters)
File
"/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/trino/hooks/trino.py",
line 169, in get_first
return super().get_first(self.strip_sql_string(sql), parameters)
AttributeError: 'TrinoCustomHook' object has no attribute 'strip_sql_string'
[2022-08-18, 06:08:33 UTC] {taskinstance.py:1420} INFO - Marking task as
FAILED. dag_id=md_ca_sync, task_id=task_1, execution_date=20220816T130000,
start_date=20220818T060832, end_date=20220818T060833
[2022-08-18, 06:08:33 UTC] {standard_task_runner.py:97} ERROR - Failed to
execute job 10 for task task_1 ('TrinoCustomHook' object has no attribute
'strip_sql_string'; 157)
[2022-08-18, 06:08:33 UTC] {local_task_job.py:156} INFO - Task exited with
return code 1
[2022-08-18, 06:08:33 UTC] {local_task_job.py:273} INFO - 0 downstream tasks
scheduled from follow-on schedule check
### What you think should happen instead
_No response_
### How to reproduce
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]