class Datasets extends Resource (View source)

The "datasets" collection of methods.

Typical usage is:

 $bigqueryService = new Google\Service\Bigquery(...);
 $datasets = $bigqueryService->datasets;

Methods

delete(string $projectId, string $datasetId, array $optParams = [])

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. (datasets.delete)

get(string $projectId, string $datasetId, array $optParams = [])

Returns the dataset specified by datasetID. (datasets.get)

insert(string $projectId, Dataset $postBody, array $optParams = [])

Creates a new empty dataset. (datasets.insert)

listDatasets(string $projectId, array $optParams = [])

Lists all datasets in the specified project to which the user has been granted the READER dataset role. (datasets.listDatasets)

patch(string $projectId, string $datasetId, Dataset $postBody, array $optParams = [])

Updates information in an existing dataset. 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. (datasets.patch)

undelete(string $projectId, string $datasetId, UndeleteDatasetRequest $postBody, array $optParams = [])

Undeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted. (datasets.undelete)

update(string $projectId, string $datasetId, Dataset $postBody, array $optParams = [])

Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. (datasets.update)

Details

delete(string $projectId, string $datasetId, array $optParams = [])

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. (datasets.delete)

Parameters

string $projectId

Required. Project ID of the dataset being deleted

string $datasetId

Required. Dataset ID of dataset being deleted

array $optParams

Optional parameters.

Exceptions

Exception

Dataset get(string $projectId, string $datasetId, array $optParams = [])

Returns the dataset specified by datasetID. (datasets.get)

Parameters

string $projectId

Required. Project ID of the requested dataset

string $datasetId

Required. Dataset ID of the requested dataset

array $optParams

Optional parameters.

Return Value

Dataset

Exceptions

Exception

Dataset insert(string $projectId, Dataset $postBody, array $optParams = [])

Creates a new empty dataset. (datasets.insert)

Parameters

string $projectId

Required. Project ID of the new dataset

Dataset $postBody
array $optParams

Optional parameters.

Return Value

Dataset

Exceptions

Exception

DatasetList listDatasets(string $projectId, array $optParams = [])

Lists all datasets in the specified project to which the user has been granted the READER dataset role. (datasets.listDatasets)

Parameters

string $projectId

Required. Project ID of the datasets to be listed

array $optParams

Optional parameters.

Return Value

DatasetList

Exceptions

Exception

Dataset patch(string $projectId, string $datasetId, Dataset $postBody, array $optParams = [])

Updates information in an existing dataset. 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. (datasets.patch)

Parameters

string $projectId

Required. Project ID of the dataset being updated

string $datasetId

Required. Dataset ID of the dataset being updated

Dataset $postBody
array $optParams

Optional parameters.

Return Value

Dataset

Exceptions

Exception

Dataset undelete(string $projectId, string $datasetId, UndeleteDatasetRequest $postBody, array $optParams = [])

Undeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted. (datasets.undelete)

Parameters

string $projectId

Required. Project ID of the dataset to be undeleted

string $datasetId

Required. Dataset ID of dataset being deleted

UndeleteDatasetRequest $postBody
array $optParams

Optional parameters.

Return Value

Dataset

Exceptions

Exception

Dataset update(string $projectId, string $datasetId, Dataset $postBody, array $optParams = [])

Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. (datasets.update)

Parameters

string $projectId

Required. Project ID of the dataset being updated

string $datasetId

Required. Dataset ID of the dataset being updated

Dataset $postBody
array $optParams

Optional parameters.

Return Value

Dataset

Exceptions

Exception