There are some ways to create BigQuery Table in Google Cloud platform, but I found there is easiest way, which uses Google Api Explorer.
Here are the steps I used:
- Go to Api Explorer for BigQuery : https://developers.google.com/apis-explorer/#p/bigquery/v2/ that will show lists of BigQuery API v2
- Select bigquery.tables.insert until it shows the page UI
- Click switch button “Authorize Requests using Oauth 2.0” to do authentication first in the bigquery.tables.insert Api explorer page (see picture below)
- Fill the project_id, dataset_id, and the json in Request Body .
Note: on the request body, select Freeform Editor on combox box that appears when we click on it so we can type json we wants - Example Json:
{ "tableReference": { "projectId": "xxxxxxx", "datasetId": "log", "tableId": "log_table_name" }, "schema": { "fields": [ { "name": "company_id", "type": "INTEGER" }, { "name": "user_id", "type": "INTEGER" }, { "name": "timestamp", "type": "INTEGER" }, { "name": "status", "type": "BOOLEAN" } ] } }
Here is screenshot of the page of API Explorer for bigquery.tables.insert: