Consistency Guaranteed: With Ontology enabled, the same metric always produces the same calculation—ensuring everyone in your organization gets aligned results.

Ana using ontology to explore database structure and query metrics
You Define the Structure
Users create and customize their own ontology by defining these core components:Objects
Your business entities that map to database tablesExample: Customers, Orders, Products
Metrics
Pre-defined calculations with exact SQL logicExample: “Total Revenue”, “Customer Lifetime Value”
Dimensions
Attributes for grouping and filtering dataExample: “Order Date”, “Customer Region”
Links
Relationships between different objectsExample: “Orders belong to Customers”
How It Differs from Text to SQL
- Quick Comparison
- Text to SQL
- Ontology
| Feature | Text to SQL | Ontology |
|---|---|---|
| Query Generation | Generates SQL from scratch each time | Uses pre-defined metric SQL |
| Consistency | May vary between queries | Same metric = same calculation always |
| Business Logic | Ana figures it out on the fly | Pre-configured by you |
| Complexity | Can handle simple queries well | Excels with complex data models |
| Setup Required | None | Requires ontology configuration |
When to Use
Enable the Ontology tool when:1
You Have an Ontology Configured
An ontology must be built and configured for your data warehouse before you can use this tool.
2
You Need Consistency
When metric calculations must be consistent across your organization and over time.
3
Complex Data Models
Your data model has many tables with intricate relationships that are hard to explain each time.
4
Enforce Business Logic
You want to ensure everyone uses the same definitions and calculation methods.
5
Pre-Defined Metrics
You’re asking questions about metrics that have already been defined in your ontology.
Benefits
Consistency
Everyone gets the same numbers for the same metrics—no more “version of the truth” debates
Efficiency
No need to explain complex joins and calculations repeatedly—they’re pre-configured
Governance
Control how metrics are calculated and ensure compliance with business rules
Self-Service
Non-technical users can query using business terms without knowing SQL
Documentation
Your ontology serves as living documentation of your data model
Scalability
As your data model grows, the ontology handles increased complexity gracefully
Building Your Ontology
Ready to create or enhance your ontology? Check out these resources:Ontology Overview
Learn the fundamentals of ontologies and how they work in TextQL
Creating Objects
Define your business entities and map them to database tables
Defining Metrics
Create calculations with business logic that everyone can use
Setting Up Links
Configure relationships between your objects
Writing Queries
Learn how to query your ontology effectively
Why Use Ontology?
Understand the value proposition and use cases
Best Practices
Start with Core Metrics
Start with Core Metrics
Begin by defining your organization’s most important and frequently-used metrics. Don’t try to model everything at once.Examples:
- Revenue metrics (MRR, ARR, Total Revenue)
- Customer metrics (CAC, LTV, Churn Rate)
- Operational metrics (Conversion Rate, Average Order Value)
Use Clear Naming
Use Clear Naming
Name your objects, metrics, and dimensions using familiar business terminology that everyone understands.Good: “Monthly Recurring Revenue”, “Customer Lifetime Value”Avoid: “mrr_calc_v2”, “ltv_formula”
Document Your Logic
Document Your Logic
Add descriptions to your metrics explaining what they calculate and when to use them. This helps users understand which metric to choose.
Version Control Changes
Version Control Changes
When updating metric definitions, consider the impact on historical reports. Document changes and communicate them to your team.
Regular Reviews
Regular Reviews
Periodically review your ontology with business stakeholders to ensure it still reflects current business logic and requirements.