【发布时间】:2020-01-21 15:21:46
【问题描述】:
我正在尝试在 Bigquery 中展平分析数据,并且我已经看到了 unnest hits 和 products 的其他答案,但是一旦我包含 unnest(product),我得到的结果就会减少,并且只收到 hit.type 的行=“事件”。
如果我注释掉 unnest(products),那么我会收到更多行,包括 hit.type = 'PAGE' 和 hit.type = '事件' 但是我无法在选择中引用任何产品级别数据,因为 unnest(product) 已被注释掉。
这只发生在数据集的特定时期,我在早期数据中看到了 PAGE 命中类型。我不明白!帮忙!
会发生什么?
select
h.type as hits_type
-- ,product.productSKU
-- ,product.v2ProductName as product_name
from `bigquery-public-data.google_analytics_sample.ga_sessions_20170801`,
unnest(hits) h,
--unnest(h.product) as p
【问题讨论】:
标签: google-analytics google-bigquery