[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[[["\u003cp\u003eDatasets are top-level containers within a project that organize and control access to tables and views, requiring at least one dataset to be created before loading data into BigQuery.\u003c/p\u003e\n"],["\u003cp\u003eDataset locations are set during creation and cannot be changed afterward, impacting where data is stored and processed, with an option to copy or recreate the dataset if needed in a different location.\u003c/p\u003e\n"],["\u003cp\u003eStorage billing models for datasets can be chosen as either logical or physical, influencing storage pricing, although changing this model has a 14-day waiting period before another change can be made.\u003c/p\u003e\n"],["\u003cp\u003eExternal datasets, also known as federated datasets, link to external data sources like Spanner or AWS Glue, enabling queries without copying data into BigQuery.\u003c/p\u003e\n"],["\u003cp\u003eDatasets have limitations, such as location immutability post-creation, the need for tables in a query to be in the same location, and constraints on storage billing model changes.\u003c/p\u003e\n"]]],[],null,["# Introduction to datasets\n========================\n\nThis page provides an overview of datasets in BigQuery.\n\nDatasets\n--------\n\nA dataset is contained within a specific [project](/docs/overview#projects). Datasets\nare top-level containers that are used to organize and control access to your\n[tables](/bigquery/docs/tables) and [views](/bigquery/docs/views). A table\nor view must belong to a dataset, so you need to create at least one dataset before\n[loading data into BigQuery](/bigquery/loading-data-into-bigquery).\nUse the format `projectname.datasetname` to fully qualify a dataset name when\nusing GoogleSQL, or the format `projectname:datasetname` to fully qualify\na dataset name when using the bq command-line tool.\n\nLocation\n--------\n\nYou specify a location for storing your BigQuery data when you\ncreate a dataset. For a list of BigQuery dataset locations, see\n[BigQuery locations](/bigquery/docs/locations). After you create\nthe dataset, the location cannot be changed\n, but you can [copy datasets to different locations](/bigquery/docs/copying-datasets),\nor manually [move (recreate) the dataset in a different\nlocation](/bigquery/docs/managing-datasets#recreate-dataset).\n\nBigQuery processes queries in the same location as the dataset that\ncontains the tables you're querying. BigQuery stores your data in the\nselected location\nin accordance with the [Service Specific Terms](/terms/service-terms).\n\nData retention\n--------------\n\nDatasets use [time travel](/bigquery/docs/time-travel#time_travel) in\nconjunction with the [fail-safe period](/bigquery/docs/time-travel#fail-safe)\nto retain deleted and modified data for a short time, in case you need to\nrecover it. For more information, see\n[Data retention with time travel and fail-safe](/bigquery/docs/time-travel).\n\nStorage billing models\n----------------------\n\nYou can be billed for BigQuery data storage in either logical or\nphysical (compressed) bytes, or a combination of both.\nThe storage billing model you choose determines your\n[storage pricing](/bigquery/pricing#storage). The storage billing model you\nchoose doesn't impact BigQuery performance. Whichever billing\nmodel you choose, your data is stored as physical bytes.\n\nYou set the storage billing model at the dataset level.\nIf you don't specify a storage billing model when you create a dataset, it\ndefaults to using logical storage billing. However, you can\n[change a dataset's storage billing model](/bigquery/docs/updating-datasets#update_storage_billing_models)\nafter you create it. If you change a dataset's storage\nbilling model, you must wait 14 days before you can change the storage billing\nmodel again.\n\nWhen you change a dataset's billing model, it takes 24 hours for the\nchange to take effect. Any tables or table partitions in long-term storage\nare not reset to active storage when you change a dataset's billing model.\nQuery performance and query latency are not affected by changing a dataset's\nbilling model.\n\nDatasets use [time travel](/bigquery/docs/time-travel#time_travel) and\n[fail-safe](/bigquery/docs/time-travel#fail-safe) storage for data retention.\nTime travel and fail-safe storage are charged separately at active storage rates\nwhen you use physical storage billing, but are included in the base rate you are\ncharged when you use logical storage billing. You can modify the time travel\nwindow you use for a dataset in order to balance physical storage costs with\ndata retention. You can't modify the fail-safe window. For more information\nabout dataset data retention, see\n[Data retention with time travel and fail-safe](/bigquery/docs/time-travel).\nFor more information on forecasting your storage costs, see\n[Forecast storage billing](/bigquery/docs/information-schema-table-storage#forecast_storage_billing).\n\nYou can't enroll a dataset in physical storage billing if your organization has\nany existing legacy\n[flat-rate slot commitments](/bigquery/docs/reservations-commitments-legacy)\nlocated in the same region as the dataset. This doesn't apply to commitments\npurchased with a [BigQuery edition](/bigquery/docs/editions-intro).\n\nExternal datasets\n-----------------\n\nIn addition to BigQuery datasets, you can create external datasets, which are links to external data sources:\n\n- [Spanner external dataset](/bigquery/docs/spanner-external-datasets)\n- [AWS Glue federated dataset](/bigquery/docs/glue-federated-datasets)\n\n*External datasets* are also known as *federated datasets*; both terms are used interchangeably.\n\nOnce created, external datasets contain tables from a referenced external data source. Data from these tables aren't copied into BigQuery, but queried every time they are used. For more information, see [Spanner federated queries](/bigquery/docs/spanner-federated-queries).\n\nLimitations\n-----------\n\nBigQuery datasets are subject to the following limitations:\n\n- The [dataset location](/bigquery/docs/locations) can only be set at creation time. After a dataset is created, its location cannot be changed.\n- All tables that are referenced in a query must be stored in datasets in the same location.\n- External datasets don't support table expiration, replicas, time travel, default collation, default rounding mode, or the option to enable or disable case-insensitive table names.\n\n- When [you copy a table](/bigquery/docs/managing-tables#copy-table), the\n datasets that contain the source table and destination table must reside in\n the same location.\n\n- Dataset names must be unique for each project.\n\n- If you change a dataset's\n [storage billing model](#dataset_storage_billing_models), you must wait 14\n days before you can change the storage billing model again.\n\n- You can't enroll a dataset in physical storage billing if you have any\n existing legacy\n [flat-rate slot commitments](/bigquery/docs/reservations-commitments-legacy)\n located in the same region as the dataset.\n\nQuotas\n------\n\nFor more information on dataset quotas and limits, see\n[Quotas and limits](/bigquery/quotas#dataset_limits).\n\nPricing\n-------\n\nYou are not charged for creating, updating, or deleting a dataset.\n\nFor more information on BigQuery pricing, see [Pricing](/bigquery/pricing).\n\nSecurity\n--------\n\nTo control access to datasets in BigQuery, see\n[Controlling access to datasets](/bigquery/docs/control-access-to-resources-iam).\nFor information about data encryption, see [Encryption at rest](/bigquery/docs/encryption-at-rest).\n\nWhat's next\n-----------\n\n- For more information on creating datasets, see [Creating datasets](/bigquery/docs/datasets).\n- For more information on assigning access controls to datasets, see [Controlling access to datasets](/bigquery/docs/dataset-access-controls)."]]