google/cloud/bigquery/client.py
def query_rows(
            self, query, job_config=None, job_id=None, job_id_prefix=None,
            timeout=None, retry=DEFAULT_RETRY):
        """Start a query job and wait for the results.

        See
        https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query

        :type query: str
        :param query:
            SQL query to be executed. Defaults to the standard SQL dialect.
            Use the ``job_config`` parameter to change dialects.

        :type job_config: :class:`google.cloud.bigquery.job.QueryJobConfig`
        :param job_config: (Optional) Extra configuration options for the job.

        :type job_id: str
        :param job_id: (Optional) ID to use for the query job.

        :type job_id_prefix: str or ``NoneType``
        :param job_id_prefix: (Optional) the user-provided prefix for a
                              randomly generated job ID. This parameter will be
                              ignored if a ``job_id`` is also given.

        :type timeout: float
        :param timeout:
            (Optional) How long (in seconds) to wait for job to complete
            before raising a :class:`concurrent.futures.TimeoutError`.

        :rtype: :class:`~google.api_core.page_iterator.Iterator`
        :returns:
            Iterator of row data :class:`tuple`s. During each page, the
            iterator will have the ``total_rows`` attribute set, which counts
            the total number of rows **in the result set** (this is distinct
            from the total number of rows in the current page:
            ``iterator.page.num_items``).

        :raises:
            :class:`~google.api_core.exceptions.GoogleAPICallError` if the
            job failed or :class:`concurrent.futures.TimeoutError` if the job
            did not complete in the given timeout.

            When an exception happens, the query job will be cancelled on a
            best-effort basis.
        """
        job_id = _make_job_id(job_id, job_id_prefix)

        try:
            job = self.query(
                query, job_config=job_config, job_id=job_id, retry=retry)
            rows_iterator = job.result(timeout=timeout)
        except (GoogleAPICallError, concurrent.futures.TimeoutError):
            try:
                self.cancel_job(job_id)
            except NotFound:
                # It's OK if couldn't cancel because job never got created.
                pass
            raise

        return rows_iterator
Start a query job and wait for the results.

        See
        https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query

        :type query: str
        :param query:
            SQL query to be executed. Defaults to the standard SQL dialect.
            Use the ``job_config`` parameter to change dialects.

        :type job_config: :class:`google.cloud.bigquery.job.QueryJobConfig`
        :param job_config: (Optional) Extra configuration options for the job.

        :type job_id: str
        :param job_id: (Optional) ID to use for the query job.

        :type job_id_prefix: str or ``NoneType``
        :param job_id_prefix: (Optional) the user-provided prefix for a
                              randomly generated job ID. This parameter will be
                              ignored if a ``job_id`` is also given.

        :type timeout: float
        :param timeout:
            (Optional) How long (in seconds) to wait for job to complete
            before raising a :class:`concurrent.futures.TimeoutError`.

        :rtype: :class:`~google.api_core.page_iterator.Iterator`
        :returns:
            Iterator of row data :class:`tuple`s. During each page, the
            iterator will have the ``total_rows`` attribute set, which counts
            the total number of rows **in the result set** (this is distinct
            from the total number of rows in the current page:
            ``iterator.page.num_items``).

        :raises:
            :class:`~google.api_core.exceptions.GoogleAPICallError` if the
            job failed or :class:`concurrent.futures.TimeoutError` if the job
            did not complete in the given timeout.

            When an exception happens, the query job will be cancelled on a
            best-effort basis.
        
Start a query job and wait for the results.
Start a query job and wait for the results .
def query_rows(
            self, query, job_config=None, job_id=None, job_id_prefix=None,
            timeout=None, retry=DEFAULT_RETRY):
        job_id = _make_job_id(job_id, job_id_prefix)
        try:
            job = self.query(
                query, job_config=job_config, job_id=job_id, retry=retry)
            rows_iterator = job.result(timeout=timeout)
        except (GoogleAPICallError, concurrent.futures.TimeoutError):
            try:
                self.cancel_job(job_id)
            except NotFound:
                pass
            raise
        return rows_iterator
def query_rows ( self , query , job_config = None , job_id = None , job_id_prefix = None , timeout = None , retry = DEFAULT_RETRY ) : job_id = _make_job_id ( job_id , job_id_prefix ) try : job = self . query ( query , job_config = job_config , job_id = job_id , retry = retry ) rows_iterator = job . result ( timeout = timeout ) except ( GoogleAPICallError , concurrent . futures . TimeoutError ) : try : self . cancel_job ( job_id ) except NotFound : pass raise return rows_iterator
Start a query job and wait for the results.
Start a query job and wait for the results .
"""Start a query job and wait for the results.

        See
        https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.query

        :type query: str
        :param query:
            SQL query to be executed. Defaults to the standard SQL dialect.
            Use the ``job_config`` parameter to change dialects.

        :type job_config: :class:`google.cloud.bigquery.job.QueryJobConfig`
        :param job_config: (Optional) Extra configuration options for the job.

        :type job_id: str
        :param job_id: (Optional) ID to use for the query job.

        :type job_id_prefix: str or ``NoneType``
        :param job_id_prefix: (Optional) the user-provided prefix for a
                              randomly generated job ID. This parameter will be
                              ignored if a ``job_id`` is also given.

        :type timeout: float
        :param timeout:
            (Optional) How long (in seconds) to wait for job to complete
            before raising a :class:`concurrent.futures.TimeoutError`.

        :rtype: :class:`~google.api_core.page_iterator.Iterator`
        :returns:
            Iterator of row data :class:`tuple`s. During each page, the
            iterator will have the ``total_rows`` attribute set, which counts
            the total number of rows **in the result set** (this is distinct
            from the total number of rows in the current page:
            ``iterator.page.num_items``).

        :raises:
            :class:`~google.api_core.exceptions.GoogleAPICallError` if the
            job failed or :class:`concurrent.futures.TimeoutError` if the job
            did not complete in the given timeout.

            When an exception happens, the query job will be cancelled on a
            best-effort basis.
        """ # It's OK if couldn't cancel because job never got created.
Iterator of row data :class:`tuple`s. During each page, the
iterator will have the ``total_rows`` attribute set, which counts
the total number of rows **in the result set** (this is distinct
from the total number of rows in the current page:
``iterator.page.num_items``).
Iterator of row data : class : ` tuple ` s . During each page the iterator will have the ` ` total_rows ` ` attribute set which counts the total number of rows ** in the result set ** ( this is distinct from the total number of rows in the current page : ` ` iterator . page . num_items ` ` ) .
:class:`~google.api_core.page_iterator.Iterator`
:class:`~google.api_core.exceptions.GoogleAPICallError` if the
job failed or :class:`concurrent.futures.TimeoutError` if the job
did not complete in the given timeout.

When an exception happens, the query job will be cancelled on a
best-effort basis.
: class : ` ~google . api_core . exceptions . GoogleAPICallError ` if the job failed or : class : ` concurrent . futures . TimeoutError ` if the job did not complete in the given timeout . When an exception happens the query job will be cancelled on a best - effort basis .
self
query
SQL query to be executed. Defaults to the standard SQL dialect.
Use the ``job_config`` parameter to change dialects.
SQL query to be executed . Defaults to the standard SQL dialect . Use the ` ` job_config ` ` parameter to change dialects .
job_config
(Optional) Extra configuration options for the job.
( Optional ) Extra configuration options for the job .
job_id
(Optional) ID to use for the query job.
( Optional ) ID to use for the query job .
job_id_prefix
(Optional) the user-provided prefix for a
randomly generated job ID. This parameter will be
ignored if a ``job_id`` is also given.
( Optional ) the user - provided prefix for a randomly generated job ID . This parameter will be ignored if a ` ` job_id ` ` is also given .
timeout
(Optional) How long (in seconds) to wait for job to complete
before raising a :class:`concurrent.futures.TimeoutError`.
( Optional ) How long ( in seconds ) to wait for job to complete before raising a : class : ` concurrent . futures . TimeoutError ` .
retry