sijocherian / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

Error: Unexpected. Please try again. #214

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Here's the query:
    select date(time_join) as install_date,
            s.uid2 as uid,
            1 as install,
            max(case when datediff(s.activity_date, s.time_join) = 1  then 1 else 0 end) as ret1,
            max(case when datediff(s.activity_date, s.time_join) = 3  then 1 else 0 end) as ret3,
            max(case when datediff(s.activity_date, s.time_join) = 7  then 1 else 0 end) as ret7,
            max(case when datediff(s.activity_date, s.time_join) = 14 then 1 else 0 end) as ret14,
            max(case when datediff(s.activity_date, s.time_join) = 30 then 1 else 0 end) as ret30,
            max(case when datediff(s.activity_date, s.time_join) = 60 then 1 else 0 end) as ret60,

      max(case when datediff(s.activity_date, s.time_join) >= 1  then 1 else 0 end) as rret1,
            max(case when datediff(s.activity_date, s.time_join) >= 3  then 1 else 0 end) as rret3,
            max(case when datediff(s.activity_date, s.time_join) >= 7  then 1 else 0 end) as rret7,
            max(case when datediff(s.activity_date, s.time_join) >= 14 then 1 else 0 end) as rret14,
            max(case when datediff(s.activity_date, s.time_join) >= 30 then 1 else 0 end) as rret30,
            max(case when datediff(s.activity_date, s.time_join) >= 60 then 1 else 0 end) as rret60
        from (
        SELECT r.uid_i as uid2, dt as activity_date, u.time_join_t as time_join
                     , max(case when r.dt >= date(u.time_convert_t) then 1 else 0 end) as dac
                    , max(r.data_cl) as cl
                    , count(*) as sessions
        FROM (
                   SELECT uid_i , date(ts_t) as dt, data_cl_i as data_cl
                         FROM marvel_production_view.scribe20150202
                            where counter_s='login'
                            group each by uid_i, dt, data_cl) r
        join each marvel_production_view.users u on r.uid_i=u.uid_i
        group each by uid2, activity_date, time_join
      ) s
        group each by install_date, uid

    limit 100

What is the expected output? What do you see instead?

I expected to see data returned, instead I get Error: Unexpected. Please try 
again. Job ID: mcoc-bi:job_wQ2rn5cw3ZBDC2ujfEoyz0Q0wUI

What version of the product are you using? On what operating system?

Just using the bigquery web interface.

Please provide any additional information below.

This response from BQ makes it impossible to troubleshoot the BQL in this case. 

Original issue reported on code.google.com by cpilio...@gmail.com on 3 Feb 2015 at 9:31

GoogleCodeExporter commented 9 years ago
Sigh as I submitted this ticket the line "1 as install" is the cause.   Does BQ 
not support returning constants in the result set?   Makes sense perhaps it 
wouldn't I guess...  

Original comment by cpilio...@gmail.com on 3 Feb 2015 at 9:34