Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Einführung: Tabellenklone
Dieses Dokument bietet einen Überblick über Tabellenklone in BigQuery.
Es richtet sich an Nutzer, die mit BigQuery und BigQuery-Tabellen vertraut sind.
Ein Tabellenklon ist eine einfache, beschreibbare Kopie einer anderen Tabelle (der Basistabelle). Ihnen werden nur Kosten für die Speicherung von Daten im Tabellenklon in Rechnung gestellt, wenn diese sich von den Daten in der Basistabelle unterscheiden. Für Tabellenklone fallen anfangs also keine Speicherkosten an. Abgesehen vom Abrechnungsmodell für den Speicher und einigen zusätzlichen Metadaten für die Basistabelle ähnelt ein Tabellenklon einer Standardtabelle. Sie können ihn abfragen, erstellen, kopieren usw.
Gängige Anwendungsfälle für Tabellenklone:
Kopien von Produktionstabellen erstellen, die Sie für die Entwicklung und Tests verwenden können
Sandboxes für Nutzer erstellen, um ihre eigenen Analysen und Datenmanipulationen zu generieren, ohne alle Produktionsdaten physisch zu kopieren
Nur die geänderten Daten werden in Rechnung gestellt.
Nachdem Sie einen Tabellenklon erstellt haben, ist er von der Basistabelle unabhängig. Änderungen, die an der Basistabelle oder dem Tabellenklon vorgenommen werden, sind im jeweils anderen Element nicht enthalten.
Wenn Sie schreibgeschützte, einfache Kopien Ihrer Tabellen benötigen, können Sie Tabellen-Snapshots verwenden.
Tabellenklon-Metadaten
Ein Tabellenklon hat dieselben Metadaten wie eine Standardtabelle sowie folgende Daten:
Projekt, Dataset und Name der Basistabelle des Tabellenklons.
Die Zeit des Tabellenklonvorgangs. Wenn Zeitreise zur Erstellung des Tabellenklons verwendet wurde, ist dies der Zeitstempel der Zeitreise.
Im Allgemeinen werden Tabellenklone genauso wie Standardtabellen genutzt, einschließlich folgender Vorgänge:
Abfragen
Zugriffssteuerung
Metadaten aufrufen
Partitionierung und Clustering
Mit Schemas arbeiten
Wird gelöscht
Allerdings unterscheidet sich die Erstellung eines Tabellenklons von der Erstellung einer Standardtabelle. Weitere Informationen finden Sie unter Tabellenklon erstellen.
Speicherkosten
Speicherkosten gelten für Tabellenklone. BigQuery berechnet jedoch nur die Daten in einem Tabellenklon, die nicht bereits für eine andere Tabelle berechnet werden:
Wenn ein Tabellenklon erstellt wird, fallen zuerst keine Speicherkosten an.
Werden Daten einem Tabellenklon hinzugefügt oder in ihm geändert, wird Ihnen die Speicherung der hinzugefügten oder aktualisierten Daten in Rechnung gestellt.
Wenn Daten in einem Tabellenklon gelöscht werden, fallen keine Kosten für die Speicherung der gelöschten Daten an.
Werden Daten in der Basistabelle geändert oder gelöscht, die auch in einem Tabellenklon vorhanden sind, wird Ihnen der Tabellenklonspeicher der geänderten oder gelöschten Daten in Rechnung gestellt. Wenn mehrere Klone die geänderten oder gelöschten Daten enthalten, wird Ihnen nur der Speicherplatz berechnet, der vom ältesten Klon verwendet wurde.
Wenn der Basistabelle nach dem Erstellen des Tabellenklons Daten hinzugefügt werden, fallen keine Kosten für die Speicherung dieser Daten im Tabellenklon an, aber in der Basistabelle.
Die Unterschiede zwischen den Speicherkosten für Basistabellen und Tabellenklone sind im folgenden Bild dargestellt:
Sie können eine Tabelle zwischen Datasets im selben Projekt und zwischen Datasets in verschiedenen Projekten klonen. Das Zieldataset für den Tabellenklon muss sich jedoch in der gleichen Region und unter der gleichen Organisation befinden wie die zu klonende Tabelle. Beispielsweise ist es nicht möglich, eine Tabelle aus einem Dataset in der EU in ein Dataset in den USA zu klonen.
Sie können keine Daten einer Tabelle klonen, die älter sind als der Zeitraum des Zeitreisefensters für das Dataset der Tabelle.
Wenn Sie eine Tabelle mit Daten im schreiboptimierten Speicher klonen (der Zwischenspeicher für kürzlich gestreamte Zeilen), sind die Daten im schreiboptimierten Speicher nicht im Tabellenklon enthalten.
Wenn Sie eine Tabelle mit Daten in Zeitreisen klonen, werden die Daten in Zeitreisen nicht in den Tabellenklon aufgenommen.
Tabellenklone können nicht im Bereich Explorer von Standardtabellen unterschieden werden. Sie können einen Tabellenklon jedoch von einer Standardtabelle unterscheiden, indem Sie sich die Tabellendetails ansehen.
Tabellenklondetails haben den Abschnitt Basistabelleninformationen, den Standardtabellen nicht haben.
Sie können mit einem Klonvorgang keine Daten an eine vorhandene Tabelle anhängen. Sie können beispielsweise die Flag-Einstellungen --append_table=true und --clone=true nicht im selben bq cp-Befehl verwenden. Wenn Sie beim Duplizieren einer Tabelle Daten anhängen möchten, verwenden Sie stattdessen einen Kopiervorgang.
Wenn Sie einen Tabellenklone erstellen, muss dessen Name denselben Namensregeln wie beim Erstellen einer Tabelle entsprechen.
Die Zeit, die BigQuery zum Erstellen von Tabellenklones benötigt, kann in verschiedenen Ausführungen erheblich variieren, da der zugrunde liegende Speicher dynamisch verwaltet wird.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-17 (UTC)."],[[["\u003cp\u003eTable clones are writable, lightweight copies of a base table, incurring storage costs only for data that differs from the base table.\u003c/p\u003e\n"],["\u003cp\u003eCommon uses for table clones include creating development/testing environments and sandboxes for user analytics without duplicating all production data.\u003c/p\u003e\n"],["\u003cp\u003eTable clones are independent of their base tables, meaning changes to one are not reflected in the other.\u003c/p\u003e\n"],["\u003cp\u003eTable clones have similar functionality to standard tables, allowing for querying, access control, and deletion, among other operations.\u003c/p\u003e\n"],["\u003cp\u003eStorage costs for table clones are incurred when data is added, updated, or if data is changed or deleted in the base table that also exist in the clone.\u003c/p\u003e\n"]]],[],null,["# Introduction to table clones\n============================\n\nThis document gives an overview of table clones in BigQuery.\nIt is intended for\nusers who are familiar with [BigQuery](/bigquery/docs)\nand BigQuery [tables](/bigquery/docs/tables-intro).\n\nA *table clone* is a lightweight, writable copy of another table\n(called the *base table*). You are only charged for storage of data in the\ntable clone that differs from the base table, so initially there is no storage\ncost for a table clone. Other than the billing model for storage, and some\nadditional metadata for the base table, a table clone is similar to a\nstandard table---you can query it, make a copy of it, delete it, and so on.\n\nCommon use cases for table clones include the following:\n\n- Creating copies of production tables that you can use for development and testing.\n- Creating sandboxes for users to generate their own analytics and data manipulations, without physically copying all of the production data. Only the changed data is billed.\n\nAfter you create a table clone, it is independent of the base table. Any changes\nmade to the base table or table clone aren't reflected in the other.\n\nIf you need read-only, lightweight copies of your tables, consider using\n[table snapshots](/bigquery/docs/table-snapshots-intro).\n\nTable clone metadata\n--------------------\n\nA table clone has the same metadata as a standard table, plus the following:\n\n- The project, dataset, and name of the table clone's base table.\n- The time of the table clone operation. If [time travel](/bigquery/docs/time-travel) was used to create the table clone, then this is the time travel timestamp.\n\nFor more information, see\n[INFORMATION_SCHEMA.TABLES](/bigquery/docs/information-schema-tables).\n\nTable clone operations\n----------------------\n\nIn general, you use table clones in the same way as you use\n[standard tables](/bigquery/docs/managing-tables), including the following\noperations:\n\n- Querying\n- Access control\n- Getting metadata\n- Partitioning and clustering\n- Working with schemas\n- Deleting\n\nHowever, the creation of a table clone is different from the creation of a\nstandard table. For more information, see\n[Create table clones](/bigquery/docs/table-clones-create).\n\nStorage costs\n-------------\n\n[Storage costs](/bigquery/pricing#storage) apply for table clones,\nbut BigQuery only charges for the data in a table\nclone that is not already charged to another table:\n\n- When a table clone is created, there is initially no storage cost for the\n table clone.\n\n- If data is added or changed in a table clone, then you are charged for the\n storage of the added or updated data.\n\n- If data is deleted in a table clone, then you are not charged for the storage\n of the deleted data.\n\n- If data is changed or deleted in the base table that also exists in a table\n clone, then you are charged for the table clone storage of the changed or\n deleted data. If there are multiple clones that contain the changed or\n deleted data, you are only charged for the storage used by the oldest clone.\n\n- If data is added to the base table after the table clone was\n created, then you aren't charged for storage of that data in the table clone,\n but you are charged for it in the base table,\n\nThe difference between base table and table clone storage charges is shown in\nthe following image:\n\n| **Note:**\n| - Because BigQuery storage is column-based, small changes to the data in a base table can result in large increases in storage cost for a clone of the table.\n| - Some changes to a base table can result in you being charged the full storage amount for a table clone of the table. For example, if you modify a base table with [clustering](/bigquery/docs/creating-clustered-tables#modifying-cluster-spec), that can lead to automatic re-clustering. Because re-clustering can rewrite the base table's storage blocks, the base table's storage is no longer the same as the storage of its clones. This causes the oldest of the base table's clones to be charged the full storage amount of the modified partition.\n| - Partitions can help reduce storage costs for table clones. In general, BigQuery only makes a copy of modified data within a partition, instead of the entire table clone.\n\nFor more information, see\n[BigQuery storage pricing](/bigquery/pricing#storage).\n\nLimitations\n-----------\n\n- You can clone a table between datasets in the same project, and between datasets in different projects. However, the destination dataset for the table clone must be in the same [region](/bigquery/docs/locations), and under the same [organization](/resource-manager/docs/creating-managing-organization), as the table being cloned. For example, you cannot clone a table from an EU-based dataset into a US-based dataset.\n- You can't create a clone of a table's data as it was further back than the duration of the [time travel](/bigquery/docs/time-travel) window for the table's dataset.\n- You can't create a clone of a [view](/bigquery/docs/views-intro) or a [materialized view](/bigquery/docs/materialized-views-intro).\n- You can't create a clone of an [external table](/bigquery/docs/external-tables).\n- If you clone a table that has data in write-optimized storage (the [streaming buffer for recently streamed rows](/bigquery/docs/streaming-data-into-bigquery#dataavailability)), the data in the write-optimized storage is not included in the table clone.\n- If you clone a table that has data in [time travel](/bigquery/docs/time-travel), the data in time travel is not included in the table clone.\n- Table clones can't be distinguished from standard tables in the **Explorer** pane. However, you can tell a table clone from a standard table by [looking at the table details](/bigquery/docs/tables#get_table_information_using_information_schema). Table clone details have a **Base Table Info** section that standard tables don't.\n- You can't use a clone operation to append data to an existing table. For example, you can't use the flag settings `--append_table=true` and `--clone=true` in the same [`bq cp`](/bigquery/docs/reference/bq-cli-reference#bq_cp) command. To append data when duplicating a table, use a copy operation instead.\n- When you create a table clone, its name must adhere to the same [naming rules](/bigquery/docs/tables#table_naming) as when you create a table.\n- Table clone creation is subject to BigQuery [limits](/bigquery/quotas#copy_jobs) on copy jobs.\n- The time that BigQuery takes to create table clones might vary significantly across different runs because the underlying storage is managed dynamically.\n\nQuotas and limits\n-----------------\n\nTable clones are subject to the same quotas and limits as standard tables. For\nmore information, see\n[table quotas and limits](/bigquery/quotas#table_limits). They also have\n[table clone limits](/bigquery/quotas#table_clones) that apply.\n\nWhat's next\n-----------\n\n- [Create a table clone](/bigquery/docs/table-clones-create)."]]