

def check_job(self, job_id):
    'Return the state and number of results of a query by job id.\n\n        Parameters\n        ----------\n        job_id : str\n            The job id of the query to check.\n\n        Returns\n        -------\n        tuple\n            (``bool``, ``int``) Whether or not the query has completed and the\n            total number of rows included in the query table if it has\n            completed (else 0)\n        '
    query_reply = self.get_query_results(job_id, offset=0, limit=0)
    return (query_reply.get('jobComplete', False), int(query_reply.get('totalRows', 0)))

dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/client.py BigQueryClient.check_job/original