Introduction to datasets
This page provides an overview of datasets in BigQuery.
A dataset is contained within a specific project. Datasets
are top-level containers that are used to organize and control access to your
tables and views. A table
or view must belong to a dataset, so you need to create at least one dataset before
loading data into BigQuery.
Use the format
projectname.datasetname to fully qualify a dataset name when
using Google Standard SQL, or the format
projectname:datasetname to fully qualify
a dataset name when using the
bq command-line tool.
BigQuery datasets are subject to the following limitations:
- You can set the geographic location at creation time only. After a dataset has
been created, the location becomes immutable and can't be changed by using the
Google Cloud console, using the
bqcommand-line tool, or calling the
All tables that are referenced in a query must be stored in datasets in the same location.
When you copy a table, the datasets that contain the source table and destination table must reside in the same location.
Dataset names must be unique for each project.
For more information on dataset quotas and limits, see Quotas and limits.
Dataset storage billing models
When you create a dataset, the storage used by that dataset is billed to you using logical bytes as the default unit of consumption. However, when you create a dataset using SQL or the BigQuery API, you can choose to use physical bytes for billing instead. You can also change an existing dataset's storage billing model to use physical bytes.
Once you change a dataset's storage billing model to use physical bytes, you can't change it back to using logical bytes again.
When you set your storage billing model to use physical bytes, the total storage costs you are billed for include the bytes used for time travel storage. You can configure the time travel window to balance storage costs with your data retention needs. For more information on determining your storage costs, see Calculating storage billing.
You are not charged for creating, updating, or deleting a dataset.
For more information on BigQuery pricing, see Pricing.
- For more information on creating datasets, see Creating datasets.
- For more information on assigning access controls to datasets, see Controlling access to datasets.