Skip to content

TableauOperator fails to trigger Tableau Task #42248

Description

@farrukh-t

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:

  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 a task_item argument of type TaskItem and TableauOperator passes 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions