Create a BigQuery dataset 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 create Datasets in BigQuery in the Google Cloud Platform.

To create a Dataset in BigQuery,

  • In the 'Big Query' tab, click on 'Datasets' tab.
  • Click on 'Add Dataset' and enter the name for the Dataset Id

In this below example,  the dataset named 'iot_dataset' is created in BigQuery.

A post request is made to create the dataset in BigQuery. The datasetId is passed as a JSON object of the post request.

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

{"datasetReference":{"datasetId":"iot_dataset"}}

Server response to dataset creation request

{

"kind": "bigquery#dataset",

"etag": "TkPgAaJx2b8KPGEyZGyz/A==",

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

"selfLink": "https://bigquery.googleapis.com/bigquery/v2/projects/second-inquiry-315605/datasets/iot_dataset",

"datasetReference": {

"datasetId": "iot_dataset",

"projectId": "second-inquiry-315605"

},

"access": [

{

"role": "WRITER",

"specialGroup": "projectWriters"

},

{

"role": "OWNER",

"specialGroup": "projectOwners"

},

{

"role": "OWNER",

"userByEmail": "iot-cloud-tester@second-inquiry-315605.iam.gserviceaccount.com"

},

{

"role": "READER",

"specialGroup": "projectReaders"

}

],

"creationTime": "1628347060942",

"lastModifiedTime": "1628347060942",

"location": "US",

"type": "DEFAULT"

}

The newly created dataset can be viewed in the Google console.