I have a JSON field on big query table and currently i'm using the following method to do the extraction from a id element (for example):
coalesce(
nullif(JSON_EXTRACT(e.event_payload, 'content_id'), ''),
nullif(JSON_EXTRACT(e.event_payload, 'cid'), ''),
nullif(JSON_EXTRACT(e.event_payload, 'c_id'), ''),
...
) AS content_id,
I don't have a pattern on this JSON's fields... Is possible use REGEX with JSON_EXTRACT on big query like this?
JSON_EXTRACT(e.event_payload, "(content_id|cid|c_id)") as content_id