【问题标题】:Discrepances in Bytes Processed from an historical table vs ga_sessions_ historical tables从历史表与 ga_sessions_ 历史表处理的字节数差异
【发布时间】:2018-02-28 12:17:51
【问题描述】:

如果我从所有现有的 ga_sessions_firebase 表中提取完整数据,则 Bytes Processed 为 4.5GB。

如果我将前一个查询保存到目标表中,然后从该表中提取完整数据,则 Bytes Processed 为 217GB。

两个表的表大小相同。为什么会出现这种差异?

更新:

我的standardSQL查询:

SELECT TABLE_SUFFIX AS Date, 
user_dim.app_info.app_instance_id, 
user_dim.app_info.app_version, 
user_dim.geo_info.city, 
user_properties.key, 
event.name 
FROM project.dataset.app_events_*, 
UNNEST(user_dim.user_properties) AS user_properties, 
UNNEST(event_dim) AS event

返回4.5GB。如果我保存此表(称为 historical_data),然后编写此查询:

SELECT *
FROM `project.dataset.historical_data`

然后它返回217GB

【问题讨论】:

  • 1) 当您说提取时 - 您的意思是 extract job? 2) 然后你提到 - previous query - 那么它是查询还是提取? if query - 究竟是什么查询?
  • 1) 提取 = 运行查询。 2)显示选项->目标表(例如data_historical)->运行查询->撰写查询->处理的字节数不同于SELECT * FROM project.dataset.data_historical高于1)
  • 好的。所以这两种情况实际上都是查询。如果没有看到您确切的两个查询,就很难回答您的问题!除非我仍然缺少某些东西
  • SELECT TABLE_SUFFIX AS Date, user_dim.app_info.app_instance_id, user_dim.app_info.app_version, user_dim.geo_info.city, user_properties.key, event.name FROM project.dataset.app_events_*, UNNEST(user_dim.user_properties) A​​S user_properties, UNNEST(event_dim) AS 事件
  • 你应该更新你的问题 :o) 因为在 cmets 中很难使用查询文本

标签: firebase google-analytics google-cloud-platform google-bigquery


【解决方案1】:

我认为这是可能的,因为双交叉连接 - 对于每个交叉连接的行,您现在有一组冗余的以下字段

TABLE_SUFFIX AS Date, 
user_dim.app_info.app_instance_id, 
user_dim.app_info.app_version, 
user_dim.geo_info.city  

所以即使原始表的大小为 4.5GB,但结果却是 217GB

对我来说很有意义 - 这是大数据所发生的事情 - 如果不够小心,结果可能会爆炸到巨大的规模

顺便说一句,检查原始表与输出表中的行数

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-28
    • 2022-01-24
    • 1970-01-01
    • 2019-02-04
    相关资源
    最近更新 更多