System variables in BigQuery

Today's quick post is about system variables in BigQuery. What are they?
They are a special type of variables, available in scripts (multi-statement queries). You can use them to read (and sometimes write) query metadata during query execution.
Here's a couple of examples:
- @@query_label - read/write query labels, making easier for you to group your queries based on they are used for
- @@time_zone - read/write default time zone to use
- @@script.job_id - the job id of the current job
Check out below an example with slot_ms (returns slot time in millis), bytes_billed and creation_date.
SELECT ds_date,
COUNT(DISTINCT value) AS count_values
FROM `learning.data_source`
GROUP BY ds_date;
SELECT
@@project_id AS project_id,
@@script.slot_ms AS script_slot_ms,
@@script.bytes_billed AS script_bytes_billed,
@@script.creation_time AS script_creation_time
