BigQuery JSON
Working with JSON in BigQuery — the native JSON datatype, extracting and transforming JSON data, LAX conversion functions, and handling semi-structured payloads.
- Extracting keys from JSON in BigQuery
JSON_KEYS() in BigQuery returns an array of field names from a JSON string. Control depth and key inclusion with the mode and max_depth arguments.
- Dynamically extracting JSON data in BigQuery
Extract dynamic key-value pairs from JSON in BigQuery when the schema varies per row. Uses JSON_EXTRACT and regex to handle heterogeneous JSON structures.
- LAX JSON conversion functions in BigQuery
LAX_STRING, LAX_BOOL, LAX_FLOAT64, and LAX_INT64 convert JSON values to SQL types without throwing errors on failure.
- Determining JSON types in BigQuery
JSON_TYPE in BigQuery returns the type of a JSON value — object, array, string, number, boolean, or null — as a STRING.
- JSON datatype vs JSON-like STRING in BigQuery
BigQuery handles native JSON and JSON-formatted STRING values differently. Learn what changes in validation, parsing, and function behavior.
- The JSON datatype in BigQuery
BigQuery's native JSON data type is not just a string — it enables structured access via JSON functions and stores heterogeneous data in one column.