server-client-python icon indicating copy to clipboard operation
server-client-python copied to clipboard

Tableau Server Client JobFailedException with no notes with update_hyper_data()

Open saratuncten opened this issue 2 years ago • 0 comments

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

  • Tableau Server version: 2021.3.18 (on-prem server)
  • Python version: 3.10
  • TSC library version: 0.25

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

saratuncten avatar Oct 20 '23 15:10 saratuncten