What you’ll do
- Define a business metric
- Map business terminology to your schema
- Set up table relationships
- Test the semantic layer in a conversation
Step 1: Define a metric
Metrics are the calculations your team cares about — revenue, churn rate, conversion, active users. Start with one.- Go to Semantic Layer in the Wayak dashboard
- Click Add metric
- Give it a name your team actually uses (e.g. “Revenue”)
- Define the calculation:
- Source table — the table that contains the raw data
- Aggregation — how to compute it (SUM, COUNT, AVG, etc.)
- Column — the column to aggregate
- Filters — any conditions that scope the metric (e.g.
txn_type = 'sale')
Name your metrics the way your team talks. If everyone says “MRR” not “monthly recurring revenue,” name it “MRR.” The agent matches user questions to metric names.
Step 2: Map your terminology
Your team uses business language. Your database uses column names. The semantic layer bridges the two.- Go to Terminology in the semantic layer settings
- Add mappings between business terms and schema objects:
| Business term | Maps to |
|---|---|
| ”Customers” | accounts table where status = 'active' |
| ”Sales rep” | users table where role = 'sales' |
| ”Last quarter” | Dynamic date filter: previous 3 months |
Step 3: Define table relationships
Tell the agent how your tables connect so it can join them correctly.- Go to Relationships in the semantic layer settings
- Add joins between your tables:
- From table and To table
- Join key — the columns that link them
- Join type — inner, left, etc.
Step 4: Test it
Open the Wayak chat and ask a question that uses your new metric or terminology.- “What’s our revenue this month?” — should use your defined Revenue metric
- “How many customers signed up last quarter?” — should use your Customers terminology mapping
- “Revenue by sales rep” — should join tables using your defined relationships
What’s next
Your agent now understands your business logic. Next, turn your most important questions into a dashboard.Build your first dashboard
Create views, arrange them into a dashboard, and share it with your team.

