farrukh-t opened a new issue, #42248:
URL: https://github.com/apache/airflow/issues/42248
### Apache Airflow Provider(s)
tableau
### Versions of Apache Airflow Providers
apache-airflow-providers-tableau==4.5.0
### Apache Airflow version
v2.9.0
### Operating System
ubuntu
### Deployment
Docker-Compose
### Deployment details
_No response_
### What happened
TableauOperator fails with `resource="tasks"` and `method="run"` arguments
with the following traceback:
```txt
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/tableau/operators/tableau.py",
line 118, in execute
response = method(resource_id)
^^^^^^^^^^^^^^^^^^^
File
"/home/airflow/.local/lib/python3.12/site-packages/tableauserverclient/server/endpoint/endpoint.py",
line 258, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/airflow/.local/lib/python3.12/site-packages/tableauserverclient/server/endpoint/tasks_endpoint.py",
line 73, in run
if not task_item.id:
^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'id'
```
### What you think should happen instead
I believe the issue is that `Tasks.run` method
[expects](https://github.com/tableau/server-client-python/blob/257cf616f35cc36b24a73e9e102886a52ead1853/tableauserverclient/server/endpoint/tasks_endpoint.py#L72)
a `task_item` argument of type `TaskItem` and `TableauOperator`
[passes](https://github.com/apache/airflow/blob/a5d0a63d8784d7f4100a4770748c783261968e3c/airflow/providers/tableau/operators/tableau.py#L118)
the task's id as a `str` instead.
### How to reproduce
Execute `TableauOperator` with `resource="tasks"` and `method="run"`
arguments
### 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]