Query your datamart
One query language per job - and how to pick between them.
Your goal
Get an answer out of the datamart, with the right tool for the question you are asking.
Expected outcome
Queries that return what you expect, fast enough for the context they run in.
One language per job
The datamart exposes several query languages, each designed for a different job.
GraphQL
Query the local graph of a single user, in real time
Real-time personalisation, a lookup on one person
OTQL
Query the whole object graph in a couple of seconds, even with billions of data points
Audience segmentation, data exploration, volumetry
Which fields you can query, and which you can filter on, is entirely determined by your schema. A field without @TreeIndex can be selected but not used in a WHERE clause.
Choose by the question
"What do we know about this user, right now?"
GraphQL queries - a single request returns profile, activities, segments, and identifiers for one UserPoint.
"How many users match these criteria?"
"Which users match, so I can put them in a segment?"
OTQL - segment definitions are OTQL.
"How did conversions evolve by category last month?"
"I want to explore, interactively"
"I want this to run from my code"
"I need the answer as a file"
Export - built on a saved OTQL query.
In this section
Related pages
Last updated
Was this helpful?