Intro to SQLfor Organizing
Subsection 3.4

Editor color codes

~3 min

Reading

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, and GROUP 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, or 3.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.

ColorWhat it marksExample
BLUESQL keywords (function words)SELECT, FROM, WHERE, GROUP BY
GREENData sources (table and dataset paths)bigquery-public-data.usa_names.usa_1910_current
DARK REDVariables, field names or tables you can't accessvb_voterbase_age_bucket, tmc_cell_phone
ORANGENumbers100, 2024, 3.14
BLACKOperators=, *, ;, ,

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.