BigQuery query doesn't work inside a view -
when select view i've created receive following error time time, not always:
query: timestamp evaluation: connection error. (error code: invalidquery) job id vex-custom:bquijob_59705b02_155966ddc5f start time jun 28, 2016, 11:53:50 end time jun 28, 2016, 11:53:50
running query works well.
there's 2 two special things query:
- it uses table_date_range
- it references tables project view resides. we've done lot of times without issues
can google perhaps check job id?
i checked internal details query. view failed query references makes few problematic calls timestamp
functions. here's 1 example:
select * table_date_range([...], timestamp(date_add(utc_usec_to_day(current_date()), -15, "day")), current_timestamp())
specifically, call timestamp(date_add(utc_usec_to_day(current_date()), -15, "day"))
erroring because:
utc_usec_to_day
returns integer, not timestamp.date_add
expects argument of type timestamp.
you can wrap call utc_usec_to_day
usec_to_timestamp
convert argument type timestamp, so: timestamp(date_add(usec_to_timestamp(utc_usec_to_day(current_date())), -15, "day"))
we're in process of rolling out release more closely checks expected input types of many timestamp functions, why seeing inconsistent behavior. these fixes prevent issues functions can return malformatted timestamp
s, , brings our behavior more in line our documentation on timestamp functions.
separately, need work on making sure errors occur within evaluation of timestamps table_date_range
return more useful errors "connection error".
Comments
Post a Comment