Query Service · Data Distiller
SQL in AEP
Almost anything in AEP can be pulled with SQL, but not in the same way. An ad hoc query, a batch query that writes a dataset, a computed attribute and an audience created with SQL each have their own limits and costs. Choose what the business asks for and see which tool fits.
Example assumptions
Example questions, datasets, table names and queries.
The request
What has to come out and how
The question, what defines it and the query with the tool that fits best.
Four tools
What fits and what does not
Green is the best option. Amber is possible at a cost. Red does not fit or falls short.
The limits that decide
Limits of each tool
Run time, rows, scheduling, window, where the result lands and cost.
The recommendation
First ask where the result has to end up
On someone's screen, in a dataset, on the profile or in a destination. That picks the tool before the complexity of the SQL does.
- 01
Explore with ad hoc queries
To answer a question and validate data. If it has to be repeated or returns many rows, move to batch.
- 02
Computed attributes before SQL
If it fits in a simple aggregation over events and within 6 months, do not spend compute hours or maintain a scheduled query.
- 03
Derived datasets for what does not fit
Deciles, lifetime spend, business rules across several tables. Scheduled and enabled for Profile when they need to be activated.
- 04
Watch the compute hours
Every scheduled batch query uses compute hours per year. Review what runs, how often and whether anyone uses the result.
Explore this decision
- Data governance reaches analysis too
What data usage labels do in Customer Journey Analytics, what enabled policies block, and what happens to data views and exports.