How to Unnest event_params in GA4 BigQuery Data

Last updated August 29, 2026 · By the SaturnSQL team

event_params is an ARRAY of key-value STRUCTs. Pull one parameter with a correlated subquery on its key, or CROSS JOIN UNNEST(event_params) to get one row per parameter.

Pull a single parameter (the everyday idiom)

SELECT
  event_name,
  (SELECT value.string_value
   FROM UNNEST(event_params)
   WHERE key = 'page_location') AS page_location
FROM `myproject.analytics_123456789.events_20260828`
WHERE event_name = 'page_view';

One row per parameter with UNNEST

Useful for exploring what parameters an event actually carries. The comma between the table and UNNEST is an implicit CROSS JOIN.

SELECT
  event_name,
  ep.key,
  COALESCE(
    ep.value.string_value,
    CAST(ep.value.int_value AS STRING),
    CAST(ep.value.double_value AS STRING)
  ) AS value
FROM `myproject.analytics_123456789.events_20260828`,
  UNNEST(event_params) AS ep
LIMIT 100;

Pick the right typed field

Each parameter fills exactly one of value.string_value, value.int_value, value.float_value, or value.double_value, and the others are NULL. Reading the wrong one is not an error, it just returns NULL for every row, which is the classic silent mistake here: ga_session_id lives in int_value, page_location in string_value.

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Do more with BigQuery

Related BigQuery guides