<p dir="auto">Right now <code class="notranslate">read_gbq</code> runs a query and retrieves the results into a data_frame. If one wants to also save it into a dataset table, one then has to call <code class="notranslate">to_gbq</code> which would stream the results back.</p>
<p dir="auto">The <code class="notranslate">bq</code> command line tool has an option to pass a destination dataset table immediately on query to store the results.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="cat queries/sample.sql | bq query --format csv 
  --destination_table=collection.table_name &gt; output.csv"><pre class="notranslate"><code class="notranslate">cat queries/sample.sql | bq query --format csv 
  --destination_table=collection.table_name &gt; output.csv
</code></pre></div>
<p dir="auto">Ideally <code class="notranslate">read_gbq</code> would have an additional option like <code class="notranslate">destination_table</code> that could store the results immediately.</p>
<p dir="auto">gbq.py currently returns an error if the result of a query is what Google considers to be 'Large'.  The google api allows jobs to be sent with a flag to allow large results.  It would be very beneficial to provide this as an option in the BigQuery connector.</p>