

def get_query_rows(self, job_id, offset=None, limit=None, timeout=0):
    'Retrieve a list of rows from a query table by job id.\n        This method will append results from multiple pages together. If you\n        want to manually page through results, you can use `get_query_results`\n        method directly.\n\n        Parameters\n        ----------\n        job_id : str\n            The job id that references a BigQuery query.\n        offset : int, optional\n            The offset of the rows to pull from BigQuery\n        limit : int, optional\n            The number of rows to retrieve from a query table.\n        timeout : float, optional\n            Timeout in seconds.\n\n        Returns\n        -------\n        list\n            A ``list`` of ``dict`` objects that represent table rows.\n        '
    query_reply = self.get_query_results(job_id, offset=offset, limit=limit, timeout=timeout)
    if (not query_reply['jobComplete']):
        logger.warning(('BigQuery job %s not complete' % job_id))
        raise UnfinishedQueryException()
    schema = query_reply['schema']['fields']
    rows = query_reply.get('rows', [])
    page_token = query_reply.get('pageToken')
    records = [self._transform_row(row, schema) for row in rows]
    while (page_token and ((not limit) or (len(records) < limit))):
        query_reply = self.get_query_results(job_id, offset=offset, limit=self, page_token=page_token, timeout=timeout)
        page_token = query_reply.get('pageToken')
        rows = query_reply.get('rows', [])
        records += [self._transform_row(row, schema) for row in rows]
    return (records[:limit] if limit else records)

dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/client.py BigQueryClient.get_query_rows/VarMisuse@160/469 `limit`->`self`