avatarChristianlauer

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1336

Abstract

it, make a copy of it, delete it, and so on. — Google</p></blockquote><p id="ea1c">So you could copy a previous table and continue working on that clone. You can use the previous table as a snapshot and only the new one for analysis purposes. A great thing because you pay the storage space only for the changes to the new table that differ from the original. See the whole guide <a href="https://cloud.google.com/bigquery/docs/table-clones-intro">here</a> [2].</p><p id="3ead">The SQL to do so is quite simple:</p><div id="6547"><pre>CREATE TABLE myproject.myDataset_backup.myTableClone <span class="hljs-keyword">CLONE</span> <span class="hljs-title">myproject</span>.myDataset.myTable</pre></div><p id="cad1">Others options you have is to create a snapshot or to implement a versioning logic in your data processing. Click <a href="https://readmedium.com/collaborate-better-with-data-versioning-566c2299c435">here</a> for more.</p> <figure id="b0f7"> <div> <div> <img class="ratio" src="http://placehold.it/16x9"> <iframe class="" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FYq9PfvrgM07cNq67kY%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FYq9PfvrgM07cNq67kY%2Fgiphy.gif&amp;i

Options

mage=https%3A%2F%2Fi.giphy.com%2Fmedia%2FYq9PfvrgM07cNq67kY%2Fgiphy.gif&key=a19fcc184b9711e1b4764040d3dc5c07&type=text%2Fhtml&schema=giphy" allowfullscreen="" frameborder="0" height="435" width="435"> </div> </div> </figure></iframe></div></div></figure><h2 id="6983">Sources and Further Readings</h2><p id="9f91">[1] Google, <a href="https://cloud.google.com/bigquery/docs/release-notes">Release Notes </a>(2022)</p><p id="1d3c">[2] Google, <a href="https://cloud.google.com/bigquery/docs/table-clones-intro">Introduction to table clones</a> (2022)</p><div id="ca1a" class="link-block"> <a href="https://readmedium.com/mlearning-ai-submission-suggestions-b51e2b130bfb"> <div> <div> <h2>Mlearning.ai Submission Suggestions</h2> <div><h3>How to become a writer on Mlearning.ai</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*ib0DX0UzRoFcNuZILb7rNA.jpeg)"></div> </div> </div> </a> </div><p id="d3cb">🔵 <a href="https://readmedium.com/mlearning-ai-submission-suggestions-b51e2b130bfb"><b>Become a Writer</b></a></p></article></body>

How to use the new Table Clones Function in BigQuery

Great new Feature of Data Versioning in Google BigQuery

Photo by Henry & Co. on Unsplash

If you want to snapshot tables in Big Query, e.g. to ensure versioning, you now have one more option. Namely the function to clone a table. Google offers this solution for now in preview, however, the rest of us will get it also sooner or later as per usual.

Here the official statement:

A table clone is a lightweight, writeable copy of another table (called the base table). You are only charged for storage of data in the table clone that differs from the base table, so initially there is no storage cost for a table clone. Other than the billing model for storage, and some additional metadata for the base table, a table clone is similar to a standard table — you can query it, make a copy of it, delete it, and so on. — Google

So you could copy a previous table and continue working on that clone. You can use the previous table as a snapshot and only the new one for analysis purposes. A great thing because you pay the storage space only for the changes to the new table that differ from the original. See the whole guide here [2].

The SQL to do so is quite simple:

CREATE TABLE
  myproject.myDataset_backup.myTableClone
  CLONE myproject.myDataset.myTable

Others options you have is to create a snapshot or to implement a versioning logic in your data processing. Click here for more.

Sources and Further Readings

[1] Google, Release Notes (2022)

[2] Google, Introduction to table clones (2022)

🔵 Become a Writer

Data Science
Bigquery
Sql
Programming
Ml So Good
Recommended from ReadMedium