Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 37 ยท Getting Started

The BigQuery Console Tour

Take a guided tour of the BigQuery web console: the Explorer panel, query editor, validator, results tabs, job history, and the free sandbox you can use without a billing card.

The fastest way to learn BigQuery is the Google Cloud console, the web interface at console.cloud.google.com/bigquery. You write SQL in a browser editor, press Run, and see a table of results. This lesson walks through the screen so you know where everything is before you write your first query in the next lesson.

Because the console is Google's website, I describe it in words and read-only snippets. Google redesigns it from time to time, so button positions may differ slightly, but the concepts are stable.

Getting access: the free sandbox

You need a Google account. There are two ways in:

  1. The BigQuery sandbox. You create a Google Cloud project without entering a credit card. You get a monthly free allowance of storage and query processing. Limits apply: tables expire after 60 days by default and some features (such as streaming inserts and data transfers) are unavailable.
  2. A normal project with billing enabled. You add a billing account. The free allowance still applies, and you pay only for what goes beyond it.

For this course the sandbox is enough for almost everything in chapters 1 to 5. Chapters on security, cost control and pipelines are easier to practise with billing enabled, but you can read them without it.

Query the public datasets first. Google hosts large sample datasets (names, Wikipedia pageviews, weather, GitHub activity) under the project bigquery-public-data. You can read them from your own project, and the free allowance covers your scanning.

The main areas of the screen

flowchart LR
  subgraph L["Left: Explorer"]
    P["Projects"] --> D["Datasets"] --> T["Tables and views"]
  end
  subgraph M["Middle: Query editor"]
    Q["SQL text"] --> R["Run button"]
  end
  subgraph B["Bottom: Results"]
    X["Results, JSON, Execution details"]
  end
  L --> M --> B

The Explorer lists what you can query, the editor holds SQL, and the bottom panel shows what came back.

Explorer

The left panel is a tree: project, then dataset, then table (tables, views, models and routines live inside datasets). Click a table and you get tabs:

  • Schema: column names, types and descriptions.
  • Details: size in bytes, row count, creation time, partitioning and clustering settings, expiration.
  • Preview: the first rows of the table. Preview is free: it does not run a query, so it costs nothing. This matters later, when we look at the cost of SELECT *.

You can also star projects and search the whole tree by name.

Query editor

The central area is a tabbed SQL editor with syntax highlighting, autocomplete for table and column names, and snippets. Useful habits:

  • Press Ctrl+Enter (Cmd+Enter on a Mac) to run the query.
  • Select part of the text and run, and only the selection executes.
  • Separate several statements with semicolons and BigQuery runs them as a script.
  • Use -- for single-line comments and /* ... */ for blocks.

The validator and the byte estimate

As you type, a small message at the top right of the editor says either a green tick with "This query will process X MB when run", or a red message with a syntax error and a line number. This estimate is BigQuery's dry run: it checks the SQL and calculates how many bytes it would scan, without running anything. Get used to glancing at it before every run. A query over a terabyte table that says "process 900 GB" deserves a second look.

Results panel

After a run you see several tabs:

Tab What it shows
Results The output table, with paging
JSON The same rows as JSON, useful for nested data
Execution details Stages, slot time, bytes shuffled, where time went
Job information Job ID, location, bytes processed and billed
Visualization Quick chart (appears for some results)

Every query you run is a job with an ID. You can reopen old jobs from Personal history or Project history at the bottom of the Explorer area, and from there save the SQL as a saved query, or export the result to Sheets, CSV or a table.

Finding things with SQL itself

BigQuery exposes metadata as queryable views named INFORMATION_SCHEMA. For example, to list the tables of a dataset you can run this (read-only; it needs a real project):

SQL
SELECT table_name, table_type
FROM `my-project.shop`.INFORMATION_SCHEMA.TABLES
ORDER BY table_name;

Our SQLite stand-in has a similar catalog. Here is how you would list tables and columns there, so you can practise reading a schema from SQL:

SQL Stand-in: list tables in SQLite ยท database: shop

Press Run (or Ctrl + Enter) to see the result here.

SQL Stand-in: read a table's columns ยท database: shop

Press Run (or Ctrl + Enter) to see the result here.

In BigQuery the equivalent of the second query reads INFORMATION_SCHEMA.COLUMNS and returns the same idea: one row per column with a name and type.

Keyboard and layout tips

  • Open several query tabs; each keeps its own SQL and results.
  • Use Format query (the editor menu) to tidy indentation before sharing.
  • Set the processing location (for example US or EU) in query settings if a dataset lives in a specific region. A query cannot join tables from different regions.
  • More > Query settings lets you choose a destination table, enable or disable the query cache and set a maximum bytes billed. The last one is a cost safety net you will use in chapter 7.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. How is the Explorer panel organised?

    Tables live in datasets and datasets live in projects: project.dataset.table.
  2. 2. What does the green 'This query will process X MB' message come from?

    BigQuery performs a dry run as you type. It costs nothing and tells you how many bytes the query would scan.
  3. 3. Which action costs nothing in the free console?

    Preview reads a few rows without running a billed query. SELECT * would scan every column.
  4. 4. What is a limitation of the sandbox compared with a billing-enabled project?

    The sandbox needs no card but sets expirations and disables features such as streaming inserts.

Summary

  • The console shows an Explorer tree, a SQL editor, and result tabs for each job.
  • The sandbox gives free access without a billing card; public datasets are free to practise on within your allowance.
  • The editor's byte estimate is a dry run: check it before running.
  • INFORMATION_SCHEMA views let you inspect datasets with SQL.
  • The Preview tab is free; SELECT * is not.

Next: Your First BigQuery Queries