Skip to content

server.jobs.wait_for_job fails for ID generated by create_extract #1093

Open

Description

@eschranz

Describe the bug
The job ID generated when creating an extract via TSC is not queryable by the server.jobs.wait_for_job method.

Versions
Details of your environment, including:

  • Tableau Server version 3.10
  • Python 3.8.12
  • tableauserverclient==0.19.0

To Reproduce

refresh_job = server.datasources.create_extract(datasource_item)
job_status = server.jobs.wait_for_job(refresh_job.id)

# Also
server.jobs.get_by_id(refresh_job.id)

Results

400031: Bad Request
    There was a problem querying job '{refresh_job.id}'.

Solution

from tableauserverclient.exponential_backoff import ExponentialBackoffTimer

refresh_job = server.datasources.create_extract(datasource_item)
backoff_timer = ExponentialBackoffTimer()

job = list(j for j in tsc.Pager(server.jobs) if j.id == refresh_job.id)[0]     
while job.ended_at is None:
    backoff_timer.sleep()
    print(f"{refresh_job.id} still running")
    job = list(j for j in tsc.Pager(server.jobs) if j.id == refresh_job.id)[0]

Activity

  1. changed the title [-]`server.jobs.wait_for_job` fails for ID generated by`create_extract`[/-] [+]`server.jobs.wait_for_job` fails for ID generated by `create_extract`[/+] on Aug 19, 2022
  2. jacalata commented on Aug 30, 2022

    @jacalata
    Contributor

    Thanks for posting this - it looks like it needs a server-side fix, but I can add your workaround in the client for now.

  3. nawidsayed commented on Jul 2, 2023

    @nawidsayed

    Hello, I am still facing the same issue as OP, can't query jobs related to create_extract.

    Environment:
    TSC version: 0.24,
    Rest API version: 3.19
    Tableau Server version: 2023.2.0 (20232.23.0616.0032)

  4. github-actions commented on Aug 6, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this is still relevant, please comment to keep it open.

  5. github-actions commented on Aug 21, 2026

    @github-actions

    Closing due to inactivity. If this is still relevant, please reopen or file a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions