Get the list of BigQuery datasets in a project in Google Cloud Platform (GCP)


Google's BigQuery is an enterprise data warehouse that can execute SQL queries in rapid time. It is highly scalable and runs on Google's infrastructure.

Datasets are top-level containers which contains tables and views. A dataset may contain one or more tables.

IoT Cloud Tester  application provides an easy interface to get the list of datsets in the Google Cloud Platform.

To get the list of datasets in BigQuery,

  • In the 'Big Query' tab, click on 'Datasets' tab.
  • Click on 'List Datasets'

A GET request is made to get the list of datasets from BigQuery.

GET https://bigquery.googleapis.com/bigquery/v2/projects/second-inquiry-315605/datasets HTTP/1.1

Server response for getting the datasets from BigQuery.

{

"kind": "bigquery#datasetList",

"etag": "yEYyl/YbK4QwdJSWHWW5Mg==",

"datasets": [

{

"kind": "bigquery#dataset",

"id": "second-inquiry-315605:employee",

"datasetReference": {

"datasetId": "employee",

"projectId": "second-inquiry-315605"

},

"location": "US"

},

{

"kind": "bigquery#dataset",

"id": "second-inquiry-315605:iot_dataset",

"datasetReference": {

"datasetId": "iot_dataset",

"projectId": "second-inquiry-315605"

},

"location": "US"

},

{

"kind": "bigquery#dataset",

"id": "second-inquiry-315605:my_dataset_2",

"datasetReference": {

"datasetId": "my_dataset_2",

"projectId": "second-inquiry-315605"

},

"location": "US"

},

{

"kind": "bigquery#dataset",

"id": "second-inquiry-315605:topic_to_bq",

"datasetReference": {

"datasetId": "topic_to_bq",

"projectId": "second-inquiry-315605"

},

"location": "US"

}

]

}

The list of datasets in a project can also be viewed in the Google console.