【问题标题】:Flatting analytics data - hit.type PAGE going missing扁平化分析数据 - hit.type PAGE 丢失
【发布时间】: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


    【解决方案1】:

    我解决了我自己的问题。

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-29
      • 2018-03-19
      • 2017-04-17
      • 2019-06-08
      • 1970-01-01
      相关资源
      最近更新 更多