从谷歌大数据库查询GA自定义维度 [英] query the GA custom dimension from google big database

查看:274
本文介绍了从谷歌大数据库查询GA自定义维度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



然而,我不明白为什么有错误

  SELECT MAX(IF(index = 1,value,NULL))FROM UNNEST(hits.customDimensions)AS dimension1 
$ b $'FROM atomic-life -148403.131256355.ga_sessions_ *',UNNEST(点击)作为点击

错误是:
错误:语法错误:意外的关键字FROM at [3:1]

解决方案

每个 UNNEST 操作符合交叉连接对数据进行操作。因此,您可以将数组平整为这样:

pre $ SELECT
MAX(IF(index = 1,value,NULL) )
FROM'atomic-life-148403.131256355.ga_sessions_ *',
UNNEST(hits)as hits,
UNNEST(hits.customDimensions)AS dimension1


I would like to select the custom dimension from google big.

However, I do not understand why has the error

SELECT MAX(IF(index=1, value, NULL)) FROM UNNEST(hits.customDimensions) AS dimension1

FROM 'atomic-life-148403.131256355.ga_sessions_*',  UNNEST(hits) as hits

error is : Error: Syntax error: Unexpected keyword FROM at [3:1]

解决方案

Each UNNEST operation you apply corresponds to a cross-join operation on the data. You can therefore flatten your arrays like so:

SELECT
  MAX(IF(index=1, value, NULL))
FROM 'atomic-life-148403.131256355.ga_sessions_*',
UNNEST(hits) as hits,
UNNEST(hits.customDimensions) AS dimension1

这篇关于从谷歌大数据库查询GA自定义维度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆