Google Data Studio:内部服务器错误

时间:2017-02-08 23:19:13

标签: google-data-studio

尝试在GDS中构建报告时,我发现此错误(构建时间序列图片时):

The server encountered an internal error and was unable to complete your request.

Scoped Aggregation must consume the most repeated field from every independently-repeating branch. Unused fields that must be consumed: f3_, f1_.

Error ID: b8ad2bbb

但我无法找到这意味着什么。我使用BigQuery的自定义查询,只需将countsum等简单操作应用于 ga_sessions 表。

我也尝试过使用其他字段,但错误仍然存​​在。

自定义查询(旧版):

select
date,
count(distinct fv) total_users,
count(distinct case when clicked > 0 then fv else null end) users_clicked,
count(distinct case when clicked > 0 then fv else null end) / exact_count_distinct(fv) percent_users_clicked,
count(distinct case when clicked = 0 and automatic > 0 then fv else null end) users_auto_reco,
count(distinct case when clicked = 0 and automatic > 0 then fv else null end) / exact_count_distinct(fv) percent_users_auto_reco,
count(case when (clicked > 0 or automatic > 0) and bought > 0 then 1 else null end) total_fit_sales,
count(case when (clicked > 0 and automatic = 0) and bought > 0 then 1 else null end) total_click_sales,
count(case when (clicked = 0 and automatic > 0) and bought > 0 then 1 else null end) total_auto_reco_sales,
count(case when bought > 0 then 1 else null end) total_sales,
count(case when (clicked > 0 or automatic > 0) and bought > 0 then 1 else null end) / count(case when bought > 0 then 1 else null end) percent_fit_sales,
sum(clicked) total_clicks,
sum(clicked) / exact_count_distinct(fv) CTR,
sum(automatic) total_auto_recos,
sum(paid) total_rvn,
sum(paid) / count(distinct fv) AOV,
sum(case when clicked > 0 and bought > 0 then paid else null end) click_revenue,
sum(case when clicked = 0 and automatic > 0 and bought > 0 then paid else null end) auto_reco_revenue,
sum(case when clicked > 0 or automatic > 0 and bought > 0 then paid else null end) total_fit_revenue,
sum(case when clicked > 0 and bought > 0 then paid else null end) * 0.01 click_fee,
sum(case when clicked = 0 and automatic > 0 and bought > 0 then paid else null end) * 0.003 auto_reco_fee,
sum(case when clicked > 0 and bought > 0 then paid else null end) * 0.01  + sum(case when clicked = 0 and automatic > 0 and bought > 0 then paid else null end) * 0.003 total_fee
from(
select
date,
fullvisitorid fv,
visitid v,
case when hits.eventinfo.eventcategory = 'desired_cat' then regexp_extract(hits.eventinfo.eventlabel, r'-(.*)') else hits.product.productsku end sku,
max(hits.product.v2productcategory) cat,
max(hits.product.productbrand) brand,
max(case when (hits.eventinfo.eventaction contains 'click' and hits.eventinfo.eventcategory = 'desired_cat') then 1 else 0 end) clicked,
max(case when (hits.eventinfo.eventaction contains 'desired_action' and hits.eventinfo.eventcategory = 'desired_category') then 1 else 0 end) automatic,
max(case when hits.ecommerceaction.action_type = '6' then 1 else 0 end) bought,
max(case when hits.ecommerceaction.action_type = '6' then hits.product.productquantity * hits.product.productprice / 1000000 else 0 end) paid,
max(case when hits.ecommerceaction.action_type = '2' then 1 else null end) product_flag
from (table_date_range([dataset_id.ga_sessions_intraday_], date_add(current_date(), -7, 'day'), date_add(current_date(), -1, 'day'))),
(table_date_range([dataset_id.ga_sessions_], date_add(current_date(), -7, 'day'), date_add(current_date(), -1, 'day')))
where 1 = 1
group by fv, v, sku, date
having product_flag is not null
)
group by date

0 个答案:

没有答案