f
thoughts?
f
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
ok cool
let me try that a sec
seems not working..
f
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
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'