BigQuery exposes a graphical web UI that you can use to load and export data, run queries, and perform other user and management tasks in your browser.
The web UI runs best in the Chrome web browser.
- Browse tables
- Switch projects
- Switch to a shared dataset
- Create a new table
- Copy an existing table
- Append data to a table
- Delete tables
- Add or delete datasets
- Share a dataset
- Run queries
- Examine a table's schema
- Examine a table's data
- Download, save, and export data
- View query history
The BigQuery web UI has three main sections:
- The left side of the page (the navigation bar):
The top half of the navigation bar contains a list of items describing what action you want to perform: run a query, see query history, or see job history. The bottom half of the navigation bar contains a list of datasets in the current project that you have at least read access to, plus a public dataset called publicdata:samples, that holds public data that BigQuery exposes to all users. Each entry is a separate dataset, prefixed by the project name in the syntax projectId:datasetId. Click the display menu icon icon next to any dataset to expand it to show the tables within that dataset.
- The top of the page:
In query view, contains a query box where you can type a query in the BigQuery SQL syntax. To run a query, click the Run Query button next to the query box.
- The rest of the page:
Contains information appropriate to the selected action in the top left of the navigation bar.
Note: The BigQuery web UI is still changing, and some of the page elements or text mentioned in this document might not match the current version of the tool.
The left side of the page lists datasets that you can browse. Click the display menu icon next to a dataset to reveal the tables in that dataset. If you have read access to a dataset, you have read access to all tables in that dataset.
Clicking on a table will show a description of the table schema in the main section of the screen, and also populate the query box with a basic query for that table. You can modify the query by hand to specify fields or customize the query however you like; you are not limited to querying the currently selected table.
All of your work is billed to a specific project. You can browse a list of projects that you have access to by selecting the display menu icon next to your project name on the left of the screen and clicking Switch to Project. The list of available datasets can change depending on which project you select, since you must have read access to a project to be able to run queries in that project.
Switch to a shared dataset
It is possible for another user to share a dataset with you but not add you as a user to the corresponding Google Developers Console project. If that happens, the dataset does not automatically appear in the projects list, and you need to manually add it using the Display Projects option.
To manually add a dataset:
- Select the display menu icon next to the project name.
- Hover over the Switch to Project option.
- Click the Display Project... option.
- On the popup that appears, enter the project ID of the dataset that was shared with you.
Your shared dataset now appears at the bottom of the dataset list.
Create a new table
You can load an uncompressed CSV local file or a compressed (gzipped) or uncompressed CSV file as a new table. You cannot load a CSV file and append the results to an existing table.
To load a CSV file:
- Select the display menu icon next to the dataset in which to create your dataset and click Create new table to open the "Create Table" dialog.
- Select File upload to upload from your local computer, or Google Storage URI to upload from Google Cloud Storage.
- In Table ID, enter an ID for the new table. The table ID must be unique in that dataset, be from 1-1024 characters long, and contain only a-z, A-Z, 0-9 or _ (the underscore character), and the first character must be a letter.
- In Schema, enter the schema of the file. Schema
is described as
The values "column1_name" and "column2_name" are labels assigned to the columns in your new table.
- Specify the file location:
- If loading a local file, select Choose file and browse to one of the yob****.txt files that you downloaded and unzipped.
- If loading from Google Cloud Storage, fill in the file path in the Google Storage URI textbox.
- Click OK to load your data.
Copy an existing table
To copy a table:
- Click the display menu icon next to the table you want to copy and click Copy Table. You must have
READpermission to the source dataset of the table being copied, and
WRITEpermission to the destination dataset.
- Select the dataset where you want to store the new table.
- Enter a name for the new table. The name must be unique in the dataset where the table will belong. The table name can be up to 1024 charaters long, and can contain only a-zA-Z0-9 or _ (the underscore character) characters, and the first character must be a letter.
- Click OK to start the copy job.
Append data to a table
It is not possible to append data to a table through the web UI, but you can append data to a table using the API by setting the
writeDisposition of your job to
WRITE_APPEND. For more information, review the API reference for your desired job.
Delete a table
To delete a table, click the display menu icon next to a table that you have write rights to and click Delete Table.
Add or delete datasets
The list on the left side of the screen is a list of datasets that you have read, write, or owner access to.
To create a new dataset:
- Click the display menu icon next to the project name and select Create new dataset.
- Choose a dataset name that isn't already listed on the left side navigation bar. The name can be up to 1,024 characters long, and consist of A-Z, a-z, 0-9, and the underscore, but it cannot start with an underscore or have spaces.
- Click Create
You have automatic owner privileges on any workspaces that you create.
To delete a dataset:
- Click the display menu icon and select Delete dataset.
Share a dataset
- Click the display menu icon next to the dataset.
- Click Share dataset to open the manage collaborators dialog.
- Add new users by Google ID and specify what permissions they have on the dataset. Note that you must grant write permission on a dataset for users to be able to load data or create tables. However, you can run queries against that dataset in the web UI.
- Optionally remove or change permissions of existing users (if you are the dataset owner).
- Click Save changes when you're done making changes.
To run a query, click Compose Query at the top of the navigation bar and enter the query string in the resizable box at the top of the page. When finished composing the query text, click Run Query to execute the query. You can re-run the query by clicking Run Query with the query selected.
You can create queries that access multiple datasets or projects by qualifying the table names using the syntax projectId:datasetId.tableId. If you do not specify a project ID, the current project is assumed.
Examine a table's schema
To see a table's schema, select a table from the open dataset on the left side of the screen.
Examine a table's data
You can preview the first few rows in a table by clicking on the table in the navigation panel and then clicking on Click to preview table data.
The only way to see all the data in a table using the web UI is to run
SELECT query against it. You must specify all columns manually; the BigQuery
syntax does not support the * wildcard to indicate all fields.
Download, save, and export data
If a query result set has fewer than 16,000 rows, you can download it as a CSV file. If it has more than that number of rows, you can only save it as a table.
You can also export an entire table to Google Cloud Storage.
To download a query as a CSV file:
- Click the Download as CSV button above the query results.
To save query results as a table:
- Click the Save as Table button above the query results
To export an entire table:
- Select the table to export, then click the Actions button on the right side of the screen, and select Export...
- Enter the fully-qualified Google Cloud Storage address for the exported file. You must have write access on the target bucket.
View query history
You can see a complete history of all your most recent queries by clicking Query History in the navigation bar. To re-run a query on the history page, select the query and click Run Query.