1 Reply Latest reply on Feb 15, 2020 12:14 PM by Jake Sunstone

    Tableau Server Client (Python wrapper) - Don't know how to query a job_id without refreshing the datasource.

    Chad Banicki

      The example on GitHub for refreshing datasource using TSC using Python is something like:

       

          def refreshDataSource(self,dataSourceID):

              #Refresh the datasource

              with self.server.auth.sign_in(self.tableau_auth):

                  #Retruns the job id

                  resource = self.server.datasources.get_by_id(dataSourceID)

                 results = self.server.datasources.refresh(resource)

                  return(results)

       

      However, I can't find anywhere in the online documentation how I can get a job_id without actually refreshing the datasource. Once I have the job id I can get the status of the job. For example, I want to see if jobs that ran against a datasource completed successfully each morning using the API. I don't have access to query all the jobs on the site, so I would need to be able to specify the project id, datasource id, workbook id, or something similar to that. Any help would be greatly appreciated!

       

      Chad