Data Shaping
Data Shaping is how you tell an advisor exactly what data to analyze and how to structure it. It transforms your raw database tables — which might have complex relationships and millions of rows — into a clean, focused dataset that's ready for AI analysis.
The Core Idea
Most business data lives across multiple tables. Your accounts are in one table, telemetry data in another, support tickets in a third. Data Shaping lets you join these tables together and aggregate the data so the advisor sees one row per entity — one row per account, one row per customer, one row per opportunity.
Before Data Shaping:Your accounts table has 500 rows. Your telemetry table has 50,000 rows (multiple readings per account per day). The advisor would be overwhelmed.
After Data Shaping:500 rows — one per account — each with the most recent telemetry reading, total support tickets, and latest NPS score pulled in from related tables.
Accessing Data Shaping
Data Shaping is Step 3 of the Advisor creation wizard. Navigate to Dashboard → Advisors → New Advisor and proceed through the Type and Data Sources steps to reach Data Shaping.
The Four Tabs
1. Primary Entity
Choose the main table that defines the grain of your analysis.
- Data Source — Select your connected database
- Table — Pick the primary table (e.g.,
accounts,opportunities,customers) - Key Column — Choose the unique identifier (e.g.,
id,account_id)
accounts table with id as the key column, you'll get one row per account ID in your final output.
2. Related Tables
Bring in data from other tables by joining them to your primary entity.
For each related table, configure:
- Table — Which table to join
- Join type — How to match rows:
- Join condition — How the tables connect (e.g.,
accounts.id = telemetry.account_id)
3. Columns
Select which columns to include and how to handle them.
For each column, you can configure:
- Output name — Rename the column for clarity (e.g.,
seat_usage_percent→Latest Usage) - Include in AI analysis — Toggle whether the AI sees this column when generating insights
- Aggregation — For columns from related tables with one-to-many relationships, choose how to collapse multiple values into one:
| Aggregation | What It Does | Example Use |
|---|---|---|
| Most Recent | Gets the latest value by a date column | Current usage reading |
| Oldest | Gets the earliest value by a date column | First interaction date |
| Sum | Adds up all values | Total revenue |
| Average | Calculates the mean | Average deal size |
| Count | Counts the rows | Number of support tickets |
| Min / Max | Smallest or largest value | Lowest score, highest amount |
| Array | Collects all values into a list | All product names |
| Concatenate | Joins values into a comma-separated string | All tag names as text |
4. Preview
Test your configuration with live data before saving.
- Click Run Preview to execute the shaped query against your database
- See sample rows with AI-included columns highlighted
- Click View SQL to see the generated query (useful for debugging)
- Results typically load in under 2 seconds
Notification Delivery Column
One special column configuration: the Notification Delivery dropdown. This maps a column containing email addresses to control who receives each insight via Slack.
For example, if your accounts table has an OWNER_EMAIL column containing the sales rep's email for each account, select it as the notification delivery column. When the advisor generates an insight about Account X, the insight will be delivered as a Slack DM to the person whose email matches OWNER_EMAIL for that account.
- The column must contain email addresses
- Those emails must match actual members in your Slack workspace
- If an email doesn't match a Slack user, the insight is still created in the dashboard but won't be sent via Slack
Example: Account Expansion Advisor
Here's how you'd set up a data shaping configuration for finding expansion opportunities:
Primary Entity:- Table:
accounts - Key Column:
id
license_telemetry— Left Join onaccounts.id = license_telemetry.account_id
| Column | Source | Aggregation | In AI Analysis |
|---|---|---|---|
| Account ID | accounts.id | — | No |
| Account Name | accounts.name | — | Yes |
| Current Tier | accounts.tier | — | Yes |
| Latest Usage | telemetry.seat_usage_percent | Most Recent (by date) | Yes |
| Total Seats | telemetry.total_seats | Most Recent (by date) | Yes |
| Owner Email | accounts.owner_email | — | No |
Tips
- Start with just the primary table — Get that working, then add joins one at a time
- Use meaningful output names — The AI reads these column names, so "Latest Usage %" is better than "col_7"
- Only include columns the AI needs — Toggle off columns that are just for identification or delivery. Fewer columns = more focused analysis.
- Check the Preview tab often — It's the fastest way to catch join issues or unexpected data
- Watch your row counts — If your primary table has 100,000 rows, consider using advisor rules to filter before AI analysis