Hi <@U01T6HCHD0A> - we've recently set an A/A test...
# ask-questions
t
Hi @fresh-football-47124 - we've recently set an A/A test, but when we run the query for results, the query is referencing 'my_dataset' when we don't have any datasets under that name linked to the experiment or the metrics we've built. Is that part of the Sample Data included on GB? Lmk what the fix is for this
r
Hi Matt, correct, that's a default value that should be changed to whatever is appropriate for your setup.
t
Where can I change this? I'm not seeing a way to remove it from the query
b
Let me find it
🙏 1
Go to Metrics and Data in the left navigation bar --> Data Sources --> select a data source --> Experiment Assignment Queries --> Edit as needed
Screenshot 2023-09-14 at 5.31.35 PM.png
You will need to have Admin permissions in order to edit the Data Source https://docs.growthbook.io/account/user-permissions
t
Okay thanks, do we need to reference both the "Data Source" and the "Dataset" or just one?
b
It's usually in the format
dataset.table
-- let me know if that doesn't work for you though
t
okay cool thanks
Will let you know how that works
The update made to one of those Assignment Queries is now flagging this... which seems strange because
event_params
is query logic that GrowthBook had set already, not something I had input..
Screenshot 2023-11-15 at 6.10.50 PM.png
b
Which data source are you using?
Could you send a screenshot of the columns in your table schema?
t
We're setting up the base queries for Anon users and logged-in users. We've already unnested but we're still getting errors with the query, can you let us know how this should be setup?
SELECT
user_id as user_id,
TIMESTAMP_MICROS(event_timestamp) as timestamp,
experiment_name,
experiment_variation AS variation_name,
geo.country as country,
traffic_source.source as source,
traffic_source.medium as medium,
device.category as device,
device.web_info.browser as browser,
device.operating_system as os
FROM
``puck-data-platform`.
analytics
.`int_fct_ga_events*``
WHERE
--   ((_TABLE_SUFFIX BETWEEN '{{date startDateISO "yyyyMMdd"}}' AND '{{date endDateISO "yyyyMMdd"}}') OR
--   (_TABLE_SUFFIX BETWEEN 'intraday_{{date startDateISO "yyyyMMdd"}}' AND 'intraday_{{date endDateISO "yyyyMMdd"}}'))
event_name = 'experiment-viewed'
--   AND experiment_id_param.key = 'experiment_id'
--   AND variation_id_param.key = 'variation_id'
AND user_id is not null
Previously there was
experiment_id_param.value.string_value AS experiment_id
and
<http://variation_id_param.value.int|variation_id_param.value.int>_value AS variation_id
in lines 4 and 5 But, we're unsure why these are important / and/or what they should be instead
@brief-honey-45610 @fresh-football-47124
r
Hi Matt, we're looking into this, please stand by
👍 1
b
Hi Matt, I looked into this with one of our engineers, but we weren't able to figure out what's going on. I've escalated this and hope to hear back soon. I'll keep you updated
🙏 1
t
Okay thanks
f
I think there is a bug with the error message, and you’re actually missing the variation_id from the query
I’d try renaming variation_name to variation_id and see if that works
on line 5
t
We've since made the update to select experiment_name and experiment_variation from the table, which the query now seems to accept
However, we get this error message once that query is saved - No rows returned
Clicking 'Check it again' results in the same error
f
you still need a variation id
t
Hmmm both variation_name and variation_id are unrecognized
Do you have 20 mins to hop on a call with my dev, head of data, and I to resolve? Would be faster to talk through - we also have Metrics query questions
f
ya - you are not unnesting those values from the event
this is GA4?
t
Yes
f
did you try the default query?
Copy code
SELECT
  user_id as user_id,
  TIMESTAMP_MICROS(event_timestamp) as timestamp,
  experiment_id_param.value.string_value AS experiment_id,
  variation_id_param.value.int_value AS variation_id,
  geo.country as country,
  traffic_source.source as source,
  traffic_source.medium as medium,
  device.category as device,
  device.web_info.browser as browser,
  device.operating_system as os
FROM
  `puck-data-platform`.`analytics`.`int_fct_ga_events*`,
  UNNEST(event_params) AS experiment_id_param,
  UNNEST(event_params) AS variation_id_param
WHERE
  ((_TABLE_SUFFIX BETWEEN '{{date startDateISO "yyyyMMdd"}}' AND '{{date endDateISO "yyyyMMdd"}}') OR
   (_TABLE_SUFFIX BETWEEN 'intraday_{{date startDateISO "yyyyMMdd"}}' AND 'intraday_{{date endDateISO "yyyyMMdd"}}'))
  AND event_name = 'experiment_viewed'  
  AND experiment_id_param.key = 'experiment_id'
  AND variation_id_param.key = 'variation_id'
  AND ${userCol} is not null
t
Yeah the default queries didn't work for us because we already have these unnested and don't need that piece of what was in place. We also have different naming conventions so I believe we need to have a better understanding of what GB is trying to query so we can set them up correctly for how our data warehouse is set up cc @refined-addition-9216
f
I see