Editor color codes
BigQuery color-codes your SQL in the editor. This is more than decoration. It can help you catch mistakes.
The slide deck names these color cues:
- Blue: basic SQL syntax or function words, such as
SELECT,FROM,WHERE, andGROUP BY. - Green: data sources, such as full table paths.
- Dark red: variables, field names, or tables you may not have permission to query.
- Orange: numbers, such as
100,2024, or3.14. - Black: operators, such as
=,*,;, and commas.
If your full table path turns dark red instead of green, BigQuery may be telling you one of two things:
- You mistyped the path.
- You do not have permission to query the table.
Check spelling first. Then check access.
This is part of learning how to read the tool. BigQuery gives you signals before you even run the query.
Learner action
Paste a basic query into the editor:
SELECT * FROM `project.dataset.table` LIMIT 100;
Then look at the colors. Is the table path green? Are the SQL keywords blue? If not, review spelling and formatting.
Before Module 4, here's a small but useful detail from Rosario's SQL 101 deck. When you paste SQL into the BigQuery editor, BigQuery color-codes the pieces. If your colors are off, that's often the first hint something is wrong.
| Color | What it marks | Example |
|---|---|---|
| BLUE | SQL keywords (function words) | SELECT, FROM, WHERE, GROUP BY |
| GREEN | Data sources (table and dataset paths) | bigquery-public-data.usa_names.usa_1910_current |
| DARK RED | Variables, field names or tables you can't access | vb_voterbase_age_bucket, tmc_cell_phone |
| ORANGE | Numbers | 100, 2024, 3.14 |
| BLACK | Operators | =, *, ;, , |
Dark-red table name = permission or spelling problem
If your full project.dataset.table path turns dark red instead of green, BigQuery is telling you either (a) you mistyped the path, or (b) you don't have permission to query it. Re-check spelling first, then your access.
Action: Paste your full table path into the editor (do not run anything). Confirm it lights up green. If it's dark red, fix it now.