Docs/Start here/Getting started
Start here

Getting started with BigQuery: what to do first

Project owners set quotas, location, access and defaults before the team arrives. Analysts learn which project pays, what a query costs and which SQL behaves differently. Each has a checklist, and both list the defaults that surprise people.

Starting with BigQuery is two jobs, usually done by different people. Whoever owns the Google Cloud project sets the limits, the location and the access, before anyone runs a query, because some of those choices can’t be changed later. Everyone who writes queries learns how BigQuery bills: by bytes read, so the shape of a query decides what it costs. Each side has its own checklist, and this page lists both.

Who does what

TaskOwnerAnalyst
Choose the projects and the locationyes
Set daily query quotas and a budgetyes
Grant access, to groupsyes
Set project and dataset defaultsyes
Partition the big tables, require a date filteryes
Know which project pays for a queryyes
Check the estimate before runningyes
Filter on the partition columnyes
Put a byte limit on queriesyes
Watch spendyesyes

In a small team one person does both. Do the owner list first.

The defaults that surprise people

BigQuery’s defaults are made for getting started quickly. These are the ones to know on the first day.

DefaultWhat it meansChange it in
Project query quota: 200 TiB a dayabout $1,250 a day on on-demand pricingowner step 3
Per-user query quota: unlimitedone person or job can use the whole project’s dayowner step 3
Billing budgets only notifynothing stops when a budget is passedowner step 4
New datasets give READER to project Viewersthe basic Viewer role reads every new datasetowner step 6
bq mk --dataset with no location is USand the location can never be changedowner step 2
LIMIT doesn’t lower the bytes readunclustered, LIMIT 10 bills the whole tableanalyst step 3
No byte limit on a querya query bills whatever it readsanalyst step 6

The project owner checklist

Before you invite the team. The full checklist has the commands for each step.

  1. Separate the projects that run queries from the projects that hold data.
  2. Pick one location and pass it every time you create a dataset.
  3. Lower QueryUsagePerDay and set QueryUsagePerUserPerDay.
  4. Add a billing budget with alerts, knowing it doesn’t stop anything.
  5. Turn on the billing export to BigQuery now. It only goes back to the start of the previous month.
  6. Grant jobUser on query projects and dataViewer on datasets, to groups. Avoid basic roles.
  7. Set a default query timeout and time zone with ALTER PROJECT.
  8. Give scratch datasets a default table expiration, and choose the storage billing model.
  9. Partition and cluster big tables, with require_partition_filter.
  10. Start on on-demand pricing and compare with capacity pricing once spend is steady.
  11. Ask every tool and pipeline to label its jobs.
  12. Look at INFORMATION_SCHEMA.JOBS once a week.
  13. Learn how to restore rows, tables and datasets before you need to.

The analyst checklist

Before your first real query. The full checklist has a recorded example for each rule.

  1. Find out which project pays for your queries, and get jobUser there and dataViewer on the data.
  2. Find out which location your data is in.
  3. Read the byte estimate before running. Name columns, don’t count on LIMIT.
  4. Use the free Preview tab to look at a table.
  5. Filter on the partition column with a constant.
  6. Set a byte limit on every query.
  7. Learn the SQL that differs: / returns a float, = NULL is an error, strings are case-sensitive, timestamps are UTC.
  8. Check your own spend in INFORMATION_SCHEMA.JOBS_BY_USER.
  9. Write your own tables to a scratch dataset that expires them.
  10. Read the error message before changing the query.

Where to go next

How BigQuery works explains the storage and compute split that the billing rules come from. How a query is billed and Controlling costs go deeper on cost, and How BigQuery SQL differs on the dialect. To try the editor before connecting a project, the Playground is Querylab.io on a sample BigQuery project, with no Google account needed.