I am trying to update the hits.page.pagePath field in the Google Analytics export in BigQuery, however i'm unable to unnest the field using the method outlined in the documentation. In my case, the pagePath field is nested at two levels, "hits" and "page".
https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#update_repeated_records
The following code is incomplete, but I'm stuck with unnesting pagePath from the page RECORD.
UPDATE `project-name.datasetId.ga_sessions_yyyymmdd`
SET hits = ARRAY(
SELECT page.pagePath FROM UNNEST(hits) as pagePath
)
WHERE fullVisitorID like "%1%"
Has anyone managed to use update this field or a similar one in the GA export?
Thanks.
hits
ofga_session
tables? Something wrong happened in the export? You want to update it with the same hits thefullvisitor
had in his session? – Willian Fuks