本文介绍了从谷歌大数据库查询GA自定义维度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
然而,我不明白为什么有错误
每个 UNNEST $ c您应用的$ c>操作符合对数据进行操作。因此,您可以将数组平整为这样:
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自定义维度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!