This is an experimental RPC service definition for the BigQuery Dataset Service.
It should not be relied on for production use cases at this time.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.v2.GetDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.v2.InsertDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports RFC5789 patch semantics.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.v2.UpdateOrPatchDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.v2.UpdateOrPatchDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Deletes the dataset specified by the datasetId value.
Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.v2.DeleteDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
Returns
Type
Description
Status
a Status object. If the request failed, the status contains the details of the failure.
Lists all datasets in the specified project to which the user has been granted the READER dataset role.
Parameters
Name
Description
request
google::cloud::bigquery::v2::ListDatasetsRequest
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.v2.ListDatasetsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.bigquery.v2.ListFormatDataset, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.
Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.bigquery.v2.UndeleteDatasetRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.
opts
Options
Optional. Override the class-level options, such as retry and backoff policies.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis document provides details on the experimental RPC service definition for the BigQuery Dataset Service, which is not recommended for production use.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDatasetServiceClient\u003c/code\u003e class supports copy and move operations, which are relatively efficient because the copies share all underlying resources, unlike creating new instances.\u003c/p\u003e\n"],["\u003cp\u003eConcurrent access to different instances of \u003ccode\u003eDatasetServiceClient\u003c/code\u003e is thread-safe, but operating on the same instance from multiple threads is not guaranteed to work, and should consider creating a copy instead.\u003c/p\u003e\n"],["\u003cp\u003eThe service includes functions for common dataset operations, such as \u003ccode\u003eGetDataset\u003c/code\u003e, \u003ccode\u003eInsertDataset\u003c/code\u003e, \u003ccode\u003ePatchDataset\u003c/code\u003e, \u003ccode\u003eUpdateDataset\u003c/code\u003e, \u003ccode\u003eDeleteDataset\u003c/code\u003e, \u003ccode\u003eListDatasets\u003c/code\u003e, and \u003ccode\u003eUndeleteDataset\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDataset manipulation functions require a request parameter, which is a proto message, and optional parameters for overriding class level options, with the return type being a \u003ccode\u003eStatusOr\u003c/code\u003e for success or error reporting.\u003c/p\u003e\n"]]],[],null,["# Class DatasetServiceClient (2.29.0)\n\nVersion 2.29.0keyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/bigquerycontrol/latest/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.41.0](/cpp/docs/reference/bigquerycontrol/2.41.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.40.0](/cpp/docs/reference/bigquerycontrol/2.40.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.39.0](/cpp/docs/reference/bigquerycontrol/2.39.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.38.0](/cpp/docs/reference/bigquerycontrol/2.38.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.37.0](/cpp/docs/reference/bigquerycontrol/2.37.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.36.0](/cpp/docs/reference/bigquerycontrol/2.36.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.35.0](/cpp/docs/reference/bigquerycontrol/2.35.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.34.0](/cpp/docs/reference/bigquerycontrol/2.34.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.33.0](/cpp/docs/reference/bigquerycontrol/2.33.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.32.0](/cpp/docs/reference/bigquerycontrol/2.32.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.31.0](/cpp/docs/reference/bigquerycontrol/2.31.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.30.0](/cpp/docs/reference/bigquerycontrol/2.30.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.29.0](/cpp/docs/reference/bigquerycontrol/2.29.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.28.0](/cpp/docs/reference/bigquerycontrol/2.28.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient)\n- [2.27.0](/cpp/docs/reference/bigquerycontrol/2.27.0/classgoogle_1_1cloud_1_1bigquerycontrol__v2_1_1DatasetServiceClient) \nThis is an experimental RPC service definition for the BigQuery Dataset Service. \nIt should not be relied on for production use cases at this time.\n\n###### Equality\n\nInstances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal `std::shared_ptr\u003c*Connection\u003e` objects compare equal. Objects that compare equal share the same underlying resources.\n\n###### Performance\n\nCreating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.\n\n###### Thread Safety\n\nConcurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.\n\nConstructors\n------------\n\n### DatasetServiceClient(DatasetServiceClient const \\&)\n\nCopy and move support\n\n### DatasetServiceClient(DatasetServiceClient \\&\\&)\n\nCopy and move support\n\n### DatasetServiceClient(std::shared_ptr\\\u003c DatasetServiceConnection \\\u003e, Options)\n\nOperators\n---------\n\n### operator=(DatasetServiceClient const \\&)\n\nCopy and move support\n\n### operator=(DatasetServiceClient \\&\\&)\n\nCopy and move support\n\nFunctions\n---------\n\n### GetDataset(google::cloud::bigquery::v2::GetDatasetRequest const \\&, Options)\n\nReturns the dataset specified by datasetID.\n\n### InsertDataset(google::cloud::bigquery::v2::InsertDatasetRequest const \\&, Options)\n\nCreates a new empty dataset.\n\n### PatchDataset(google::cloud::bigquery::v2::UpdateOrPatchDatasetRequest const \\&, Options)\n\nUpdates information in an existing dataset. \nThe update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports RFC5789 patch semantics.\n\n### UpdateDataset(google::cloud::bigquery::v2::UpdateOrPatchDatasetRequest const \\&, Options)\n\nUpdates information in an existing dataset. \nThe update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.\n\n### DeleteDataset(google::cloud::bigquery::v2::DeleteDatasetRequest const \\&, Options)\n\nDeletes the dataset specified by the datasetId value. \nBefore you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.\n\n### ListDatasets(google::cloud::bigquery::v2::ListDatasetsRequest, Options)\n\nLists all datasets in the specified project to which the user has been granted the READER dataset role.\n\n### UndeleteDataset(google::cloud::bigquery::v2::UndeleteDatasetRequest const \\&, Options)\n\nUndeletes a dataset which is within time travel window based on datasetId. \nIf a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted."]]