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

acceptable-sundown-14551

11/16/2023, 8:50 AM
Hi guys!...one question, while writing experiment assignment queries i see experiment_id and variation_id as compulsory columns in the query. What exactly should i take in these columns as by experiment assignment queries i understand is that it help us define the population.
r

rhythmic-agent-34208

11/16/2023, 8:50 AM
Our official support hours are 6:30am - 5pm Pacific Time, Monday through Friday. You may occasionally hear from us outside of these hours. Your support request has been logged in our system. Our support team will get back to you very soon!
b

brief-honey-45610

11/16/2023, 3:09 PM
The
experiment_id
is a unique identifier, usually a string like 'my-cool-experiment', for an experiment within GrowthBook. It is used when filtering your experiment assignment source to query experiment exposure data. This ID is crucial for tracking and analyzing experiments, as it allows you to pinpoint the specific experiment you are interested in when looking at your data.
The
variation_id
is an identifier used within GrowthBook to distinguish between different variations of an experiment. It is typically an integer that represents the position of a variation within an array of variations. For example, if you have an experiment with two variations, "control" and "treatment", they might be assigned
variation_id
values of
0
and
1
, respectively. This identifier is used in tracking and analyzing experiment data, as it allows you to determine which variation a user was exposed to during an experiment. The
variation_id
is included in the payload of experiment assignment queries and is expected to be returned as part of the data structure for tracking experiment exposure.
Here is an example of how the data might be structured in an experiment assignment query result:
Copy code
| user_id | timestamp           | experiment_id   | variation_id |
|---------|---------------------|-----------------|--------------|
| 123     | 2021-08-23-10:53:04 | my-button-test  | 0            |
| 456     | 2021-08-23 10:53:06 | my-button-test  | 1            |
In this example,
user_id
123 saw variation
0
of the
my-button-test
experiment at the given timestamp, and
user_id
456 saw variation
1
at a different timestamp. For more details, you can refer to the Experiment Assignment Queries section in the GrowthBook documentation.
a

acceptable-sundown-14551

11/16/2023, 3:11 PM
Thanks @brief-honey-45610!!...That helps a lot!!
b

brief-honey-45610

11/16/2023, 3:12 PM
Awesome 😎 Please let us know if you have any other questions. You can create a new post in this channel if it's unrelated to this topic here.
1
a

acceptable-sundown-14551

11/16/2023, 6:43 PM
Hey @brief-honey-45610, I am a little confused. what i understood from experiment assignment query was it allows us to set the population on which an experiment is executed on growthbook(i.e. split), but i see that the variation_id already denotes the variation that a particular user_id is assigned to in the experiment. How do things flow here not able to get it😅
@fresh-football-47124 can you help explain this please?😅
r

rhythmic-agent-34208

11/16/2023, 11:56 PM
Hi Archit, the Experiment Assignment Query is really more of an "output" query — it's used only for analysis purposes during or after an experiment. It sounds like you're thinking of it more as an "input" query, for determining which users get assigned to an experiment, but that is incorrect. If you're curious about how we assign users to an experiment, please view this documentation: https://docs.growthbook.io/faq#do-users-always-get-assigned-the-same-experiment-variation
a

acceptable-sundown-14551

11/17/2023, 2:53 AM
ohh so if i am getting this right, so the population decision is actually happening in the SDK?, when we set the attributes for the given user_ids passed?....am i correct?
f

fresh-football-47124

11/17/2023, 2:54 AM
correct
the assignment query is just for reporting
a

acceptable-sundown-14551

11/17/2023, 3:01 AM
ohh thanks!...that just clears up many things!😅
b

brief-honey-45610

11/17/2023, 4:12 PM
Hi Archit, I'm glad this clears things up! We're here to help, so let us know if any other questions arise.
3 Views