繁体   English   中英

在 Google Analytics BigQuery 中获取列表 hits.eventInfo.eventAction

[英]Get List hits.eventInfo.eventAction in Google Analytics BigQuery

我想使用以下代码通过 BigQuery 获取 Google Analytics 数据中的 hits.eventInfo.eventAction 列表:

SELECT DISTINCT hits.eventInfo.eventAction FROM `ga_sessions_*`

但是这样的错误:

Cannot access field eventInfo on a value with type ARRAY<STRUCT<hitNumber INT64, time INT64

我尝试添加 UNNEST(hits) 但也有错误。 有什么建议吗?

你能试试下面的查询吗,我用的是UNNEST:

SELECT DISTINCT hits.eventInfo.eventAction FROM `bigquery-public-data.google_analytics_sample.ga_sessions_*`, UNNEST(hits) as hits

Output

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM