Google analytics Flatting analytics数据-缺少hit.type页面

Google analytics Flatting analytics数据-缺少hit.type页面,google-analytics,google-bigquery,Google Analytics,Google Bigquery,我正在尝试在Bigquery中展平分析数据,我已经看到了关于unnest的其他答案,包括hits和products,但是一旦我包括unnestproduct,我得到的结果就会减少,并且只收到hit.type='EVENT'行 如果我注释掉不感兴趣的产品,那么我会收到更多的行,包括 hit.type='PAGE'和 hit.type='EVENT' 但是,我不能在select中引用任何产品级数据,因为unnestproduct已被注释掉 这只发生在数据集的特定时期,我在早期的数据中看到了页面命中类

我正在尝试在Bigquery中展平分析数据,我已经看到了关于unnest的其他答案,包括hits和products,但是一旦我包括unnestproduct,我得到的结果就会减少,并且只收到hit.type='EVENT'行

如果我注释掉不感兴趣的产品,那么我会收到更多的行,包括 hit.type='PAGE'和 hit.type='EVENT' 但是,我不能在select中引用任何产品级数据,因为unnestproduct已被注释掉

这只发生在数据集的特定时期,我在早期的数据中看到了页面命中类型。我不明白!救命啊

会发生什么

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

我解决了自己的问题

它需要一个左连接,因为我认为有些点击不包含产品记录

from `bigquery-public-data.google_analytics_sample.ga_sessions_20170801` s, unnest(hits) h left join  unnest(h.product) p