tableau / server-client-python

A Python library for the Tableau Server REST API
https://tableau.github.io/server-client-python/
MIT License
655 stars 421 forks source link

Tableau Server Client JobFailedException with no notes with update_hyper_data() #1303

Open saratuncten opened 11 months ago

saratuncten commented 11 months ago

Describe the bug I am trying to insert data into a published .tdsx which has multi-table hyper file as the source data. I'm using Tableau Server Client update_hyper_data(). When I run the code, it runs for anywhere from a few seconds to a minute, but it always ends up failing with no notes.

Versions

To Reproduce The code I am trying references a published .tdsx as the datasource on Tableau server. The payload file is a multi-table hyper file to insert into the published data source. I have confirmed that the target-table and source-table names are correct by downloading and reviewing the tables within each file.

with server.auth.sign_in(tableau_auth):

    actions = [
        {
        "action": "insert",
        "target-table": "server_detail",
        "source-table" : "server_detail"
        }
    ]

    request_id = str(uuid.uuid4())
    datasource = server.datasources.get_by_id(my_datasource_id)
    job = server.datasources.update_hyper_data(datasource, request_id=request_id, actions=actions, payload = my_hyper_filepath_to_insert)

    print(f"Update job posted (ID: {job.id})")
    server.jobs.wait_for_job(job.id)

Results This is the error I get:

JobFailedException: Job 'job_id' failed with notes []

If I try to print the information from job.id, I see:

<Job#job_id UpdateUploadedFile created_at(2023-10-19 15:47:11+00:00) started_at(2023-10-19 15:49:38+00:00) updated_at(None) completed_at(2023-10-19 15:49:40+00:00) progress (100) finish_code(1)>

I have posted this to the Tableau community but not had luck in resolving: https://community.tableau.com/s/question/0D58b0000Bi4YqfCQE/tableau-server-client-jobfailedexception-with-no-notes