title: Export only raw data from firestore
body: <p>I am willing to export all my previous and all future firestore documents to Big Query as tabular format.</p>
  <p>Example: If I have a <code>User</code> collection in firestore like:</p>
  <pre><code>{
      &quot;name&quot;: &quot;Jon&quot;,
      &quot;score&quot;: 10,
  }
  </code></pre>
  <p>Then the BigQuery table should look like this:</p>
  <pre><code> -------------------------------------
  |       id       |   name   |  score  |
   ----------------+----------+---------
  | &lt;document_id&gt;  |   Jon    |    10   |
   ----------------+----------+---------
  </code></pre>
  <p>I have tried using</p>
  <ol>
  <li><a href="https://firebase.google.com/products/extensions/firestore-bigquery-export?authuser=0" rel="nofollow noreferrer">Export Collections to BigQuery</a>. This does not export the data in the above format; it rather keeps track of the each insert/update/delete events.</li>
  <li>Manually creating a table in the dataset and importing the backup from firestore. This does get me the BigQuery table view I want, but that is not updated automatically (like the extension does).</li>
  </ol>
  <p>What do I do to achieve the tabular format of the document mentioned above as well as it updates automatically when the firestore documents are updated? Do I have to write my own cloud function to update all the data to BigQuery?</p>