https://www.growthbook.io/ logo
#announcements
Title
# announcements
f

full-vase-45670

11/30/2021, 5:49 AM
thoughts?
f

fresh-football-47124

11/30/2021, 5:50 AM
Hi Jack. I've seen that before, and we had to cast the timestamp correctly in the query
so your likely trying to compare a TIMESTAMP to a DATETIME
and you need to make the comparisons of TIMESTAMPS to TIMESTAMPS or DATETIME to DATETIME, make sense?
if you want to DM me the query, I can help you specifically
f

full-vase-45670

11/30/2021, 6:00 AM
ok cool
let me try that a sec
seems not working..
f

future-teacher-7046

11/30/2021, 12:26 PM
I believe you need to cast timestamp columns to datetime in your experiment and metric queries. We use datetime elsewhere in the query and BigQuery is really strict about comparisons between different types.
a

average-carpet-44531

12/03/2021, 8:58 PM
Yep, i just had this same issue yesterday had to cast. We’re using Snowplow with BigQuery Our Experiments Query
Copy code
SELECT
  user_id,
  domain_userid as anonymous_id,
  cast(derived_tstamp as DATETIME) as timestamp,
  se_label as experiment_id,
  se_property as variation_id
FROM
  `snowplow_prod.snowplow-events`
WHERE  se_category = 'Growthbook' and
  se_action = 'Experiment Viewed'
and Our Metric Query
Copy code
SELECT
  domain_userid as anonymous_id,
  cast(derived_tstamp as datetime) as timestamp
FROM
  `snowplow_prod.snowplow-events`
WHERE se_action = 'Sign Up Completed'
10 Views