dbt Semantic Layer alternative

The dbt Semantic Layer alternative with verified rules and recursion

The dbt MCP server's execute_sql does not block write statements. In SynaLemma the agent writes no SQL, raw SQL is refused, and it acts only with the asker's rights.

SynaLemma

SynaLemma vs dbt Semantic Layer: key differences

  1. Every access scoped, every change on record

    The dbt MCP server's execute_sql does not block write statements. In SynaLemma the agent cannot bypass the layer: it writes no SQL, raw SQL is refused before it runs, and it acts only with the rights of the person asking. Every change to a definition is a git commit with its author, reviewable and reversible.

  2. Same rule, same SQL

    The dbt MCP text_to_sql tool generates SQL for each question. In SynaLemma the agent never writes SQL: the engine compiles it from the rule, so the same rule always gives the same SQL. Your team can lock a settled rule.

  3. The engine reasons, not the model

    MetricFlow reaches dimensions at most two hops away. The Synalog engine does every join, recursion and total, as far as the rule states. Recursive rules follow chains to a declared depth, verified to terminate and compiled to SQL.

  4. One definition per term

    MetricFlow offers five metric types, with no custom aggregations. In SynaLemma any rule can build on other rules, with aggregation, negation and time. Each business term is defined once and reused by every person and agent.

  5. Every rule proved before it runs

    dbt validations check the configuration and that the generated SQL runs. SynaLemma proves each rule well-formed, safe and terminating before any SQL runs. First-order assertions check your data and return the rows that break them.

  6. Sovereign by construction, not by contract

    Data, rules and model stay on your infrastructure. The engine compiles the SQL, so a small open model is enough; the Synalog engine is open source, under Apache-2.0.

Synalog

Example: a recursive query with assertions

A bill of materials up to 20 levels deep, with two assertions. MetricFlow stops at two hops. The data contains a cycle; the engine reports it with the rows that break the assertion.

parts.l
# The bill of materials, read from the database.
Component(assembly:, part:, quantity:) :- bom(assembly:, part:, quantity:);

# A part is inside an assembly directly, or inside one of its parts.
@Recursive(Contains, 20);
@Assert(Contains,
      transitive: "∀ a b c, Contains a b → Contains b c → Contains a c",
      no_cycle:   "∀ a, ¬ Contains a a");
Contains(assembly:, part:) distinct :- Component(assembly:, part:);
Contains(assembly:, part:) distinct :-
  Contains(assembly:, part: sub),
  Component(assembly: sub, part:);
$ synalog parts.l verify
✓ Contains.transitive holds ✗ Contains.no_cycle is violated: ∀ a, ¬ Contains a a 2 counterexamples: +---------+ | a | +---------+ | "wheel" | | "hub" | +---------+ 2 rows
At a glance

SynaLemma vs dbt Semantic Layer at a glance

SynaLemma vs dbt Semantic Layer at a glance
CriterionSynaLemmadbt Semantic Layer
Semantic: one definition per term Definitions build on each other: each business term defined once, as a rule over your tables, reused by every person and agent Semantic models and metrics in YAML on dbt models, queried by connected tools
Reasoning: who computes joins, recursion, totals The engine, not the model: Synalog computes every join and recursion, to a declared depth, compiled to SQL MetricFlow generates the joins and SQL; dimensions at most two hops away
Verified: what is checked before a rule runs Every rule proved well-formed, safe and terminating; first-order assertions return the rows that break them Configuration checks, and the generated SQL must run; dbt data tests on models
Deterministic: same rule, same SQL Never generated per question: SQL compiled by the engine from the rule; definitions reused and lockable MetricFlow compiles metric queries; the MCP text_to_sql tool generates SQL per question
Governed: access and change control The agent cannot bypass the layer: no SQL written, raw SQL refused, the asker's role only; every change a git commit Group permission sets, git version control; MCP execute_sql does not block writes
Language model The one you choose, a small open model is enough OpenAI by default, managed by dbt; your own key (OpenAI, Anthropic, Azure) on paid plans
Deployment On-premises, on your infrastructure Semantic Layer APIs on the dbt platform; the MetricFlow CLI runs locally
Definitions written in Synalog, a logic language with a compiler YAML on top of dbt models (MetricFlow)
What you can define Any rule, built on other rules Five metric types; no custom aggregations
dbt Semantic Layer

Why teams look for a dbt Semantic Layer alternative

  • Five metric types

    MetricFlow has no custom aggregations (metrics overview, FAQ).

  • Two-hop joins

    Dimensions can be at most two hops away (join logic).

  • No multi-hop chains

    Joins are limited to two hops, so hierarchies and multi-hop chains cannot be modelled (join logic).

  • Configuration checks

    Validation checks the configuration and that the SQL runs (validations).

  • Write-capable SQL for agents

    The MCP server's execute_sql does not block write statements (MCP tools).

FAQ

dbt Semantic Layer alternative: FAQ

What is the best dbt Semantic Layer alternative for AI agents?

SynaLemma. It has no fixed metric types or two-hop limit, proves its rules well-formed, safe and terminating, compiles the same rule to the same SQL and gives agents a read-only path.

Can MetricFlow join more than two hops?

No. dbt's documentation sets a limit of two hops. In Synalog, rules join as far as the question needs.

Do I need dbt to use SynaLemma?

No. SynaLemma connects to your database directly and reads the tables your dbt models already build.

Can SynaLemma run with a local model?

Yes. A small open model on your own hardware is enough, because the engine compiles the SQL.

See it on your data

Bring a question your current stack can't answer.

In 30 minutes, we show SynaLemma answering it, with the rule behind the number and the checks it passed.