[英]Cannot access field in Big Query with type ARRAY<STRUCT<hitNumber INT64, time INT64, hour INT64, …>>
I'm trying to run a query using Standard SQL Dialect (ie not Legacy SQL) on BigQuery. 我正在尝试在BigQuery上使用标准SQL方言(即不是旧版SQL)运行查询。 My query is: 我的查询是:
SELECT
date, hits.referer
FROM `refresh.ga_sessions_xxxxxx*`
LIMIT 1000
But keep getting the error 但不断收到错误
Error: Cannot access field referer on a value with type
ARRAY<STRUCT<hitNumber INT64, time INT64, hour INT64, ...>> at [2:12]
Anyone know the proper syntax? 有人知道正确的语法吗?
if you are looking for all referers - try 如果你正在寻找所有的参考者 - 试试
SELECT date, h.referer
FROM `refresh.ga_sessions_xxxxxx*`, UNNEST(hits) as h
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.