Good morning, I have a NextJS application with a N...
# ask-questions
e
Good morning, I have a NextJS application with a NodeJS API sending data to a postgres warehouse like so:
then setup a Metric and Experiment like so:
f
Hi Jorge
you're asking about that database error?
e
hi Grahan, yes exactly!
f
so there are two places to check
sounds like you checked the metirc query (thats one of them)
the other is in the assignment query, which you can find from the data source page
e
oohhh I see! but what exactly are the columns i should return? what if there are multiple schemas per datasource?
f
the required columns are the user identifier you have (probably anonymous_id), the timestamp of the exposure, and the experiment id and variation id
We can handle multiple schemas per data source
as long as you can alias and return the right columns, the data can be any structure
(on the edit query form, we'll say on the top what columns need to be returned)
e
got it! awesome now the error is gone! many thanks Graham!
I only had to delete some unexistent columns like campaign_medium and source and then i left the rest, always choosing experiment_viewed table
f
right
any additional columns returned can be used as dimensions
but are not required
e
crazy, i read this page https://docs.growthbook.io/app/datasources#experiment-assignment-queries at least 3 times, but completely confused it with the query in the metrics
f
should we improve the wording?
e
maybe a little HINT would help!
something like: WARNING, this query is different than the METRICS query
f
about where to edit them?
e
no, more like how to distinguish them
maybe a little table that explains the aim of both queries
one to validate the experiment data, and the other to validate the mtric data.
maybe it sounds silly, but they are actually very similar
f
done
❤️ 1
e
oh amazing Graham! many thanks!