https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
t

tall-branch-42668

11/15/2023, 8:53 PM
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

rhythmic-agent-34208

11/15/2023, 8:54 PM
Hi Matt, correct, that's a default value that should be changed to whatever is appropriate for your setup.
t

tall-branch-42668

11/15/2023, 8:55 PM
Where can I change this? I'm not seeing a way to remove it from the query
b

brief-honey-45610

11/15/2023, 8:56 PM
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

tall-branch-42668

11/15/2023, 10:16 PM
Okay thanks, do we need to reference both the "Data Source" and the "Dataset" or just one?
b

brief-honey-45610

11/15/2023, 10:39 PM
It's usually in the format
dataset.table
-- let me know if that doesn't work for you though
t

tall-branch-42668

11/15/2023, 10:50 PM
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

brief-honey-45610

11/15/2023, 11:22 PM
Which data source are you using?
Could you send a screenshot of the columns in your table schema?
t

tall-branch-42668

11/16/2023, 8:08 PM
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

rhythmic-agent-34208

11/16/2023, 10:27 PM
Hi Matt, we're looking into this, please stand by
👍 1
b

brief-honey-45610

11/16/2023, 11:40 PM
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

tall-branch-42668

11/16/2023, 11:40 PM
Okay thanks
f

fresh-football-47124

11/17/2023, 4:52 PM
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

tall-branch-42668

11/17/2023, 4:56 PM
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

fresh-football-47124

11/17/2023, 4:57 PM
you still need a variation id
t

tall-branch-42668

11/17/2023, 4:58 PM
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

fresh-football-47124

11/17/2023, 4:59 PM
ya - you are not unnesting those values from the event
this is GA4?
t

tall-branch-42668

11/17/2023, 5:00 PM
Yes
f

fresh-football-47124

11/17/2023, 5:00 PM
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

tall-branch-42668

11/17/2023, 6:43 PM
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

fresh-football-47124

11/17/2023, 6:43 PM
I see
2 Views