google bigquery - FIRST() function: Unrecognized is not currently supported as an analytic function -
when run aerobic-forge-504:job_4_p6sq__0c5_3b-nvyvgg-y2gf4
job, got pretty weird error message
select fullvisitorid fullvisitorid, date, (visitstarttime+hits.time) time, first(customdimensions.value) over(partition fullvisitorid) flatten([google.com:analytics-bigquery:londoncyclehelmet.ga_sessions_20130910] ,customdimensions) customdimensions.index=2 limit 100
error: unrecognized not supported analytic function. not sure wrong here.
i want return first customdimemsion
value index=2 date first recorded. since customdimension
, hits
both repeated fields, , somehow separated not sure if possible.
the proper name analytic function in sql standard first_value. first aggregation function in bigquery. query be
select fullvisitorid fullvisitorid, date, (visitstarttime+hits.time) time, first_value(customdimensions.value) over(partition fullvisitorid) flatten([google.com:analytics-bigquery:londoncyclehelmet.ga_sessions_20130910] ,customdimensions) customdimensions.index=2 limit 100
update answer question
i want return first customdimemsion value index=2 date first recorded.
i try use hits.customdimensions.[index|value], i.e.
select fullvisitorid, date, visitstarttime + first_hit_time, value ( select fullvisitorid, date, visitstarttime, first(hits.customdimensions.value) within hits value, first(hits.time) within hits first_hit_time [google.com:analytics-bigquery:londoncyclehelmet.ga_sessions_20130910] hits.customdimensions.index = 2)
Comments
Post a Comment