Contextflo Blog

How to set up a semantic layer in 5 minutes (no YAML)

Traditional semantic layers take weeks. Here's how to get consistent metrics in under 5 minutes. No YAML, no data team, no config files.

May 4, 20264 min readVivek Sah

You can set up a working semantic layer in about five minutes: connect your database read-only, auto-generate table and column descriptions from your schema, source code, and docs, refine a few, and your team queries through Claude with consistent definitions. No YAML, no modeling project.

A pourover takes about four minutes: grind, bloom, pour in slow circles, wait. Setting up your semantic layer takes about the same, so we'll use it as the timer.

Set up a semantic layer in 5 minutes

0:00 — Connect your database

While you're measuring out your coffee, open Contextflo and click "Add Data Source." Pick your warehouse (Postgres, MySQL, BigQuery, Snowflake, ClickHouse, Redshift, or Databricks). Paste in your connection string.

Tip: Use a read-only credential. Contextflo never writes to your database, and read-only access means there's zero risk of accidental mutations.

0:30 — Select tables and generate descriptions

Once connected, Contextflo scans your schema (tables, columns, foreign keys, data types). Select the tables you want your team to query. You don't need all of them. Start with the ones people ask about most: orders, users, transactions, whatever drives your business.

The platform auto-generates descriptions for each table and column, drawing on your schema plus any source code and docs you connect. "orders" becomes "Customer orders with line items, payment status, and fulfillment tracking." "created_at" becomes "Timestamp when the order was placed (UTC)."

1:30 — Review and refine definitions

Review the auto-generated descriptions. Most will be right. Some will need a tweak, like "amount" should specify "gross revenue in USD before refunds" instead of just "order amount." Click, edit, done.

This is where you encode the business logic that makes a semantic layer valuable. Not in YAML files. Not in a config repo. Just plain English descriptions that tell the AI exactly what each column means.

2:30 — Set up access control

Set up access control. Invite your team members and assign them to the data source. Everyone who needs answers gets access. Everyone who shouldn't see sensitive data doesn't.

Contextflo enforces read-only queries and logs every query for audit. Your team can ask anything without you worrying about what they might accidentally change.

3:30 — Connect Claude and ask your first question

Open Claude (or any AI that supports MCP), connect to your Contextflo workspace, and ask your first question:

"What was our revenue last month compared to the month before?"

The AI reads your table descriptions, understands that "revenue" means the sum of the "amount" column where status is completed, writes the SQL, runs it against your database, and gives you the answer. Same definition, every time, for every person on your team.

4:00 — Your semantic layer is live

That's it. Your semantic layer is live. No YAML files. No deployment pipeline. No data engineer spending two weeks mapping joins. Just a connected database with clear descriptions that give AI the context it needs to answer questions consistently.

The traditional approach (Cube, dbt, LookML) takes days to weeks and requires ongoing maintenance. This takes the length of a pourover, and the descriptions are generated rather than hand-written, so there's no separate config repo to keep in sync.

How the semantic layer improves over time

Over the next few days, your team will ask questions that reveal gaps. Maybe "churn" needs a specific definition. Maybe a join between orders and customers needs a note. You add these as you go, 30 seconds each. Your semantic layer gets smarter over time without a modeling project.

Day 1: Connect, generate descriptions, ask your first questions.

Week 1: Refine 5-10 descriptions based on real questions from your team.

Month 1: Your team has run hundreds of queries with consistent definitions, without anyone writing a line of YAML.

Connect your database, review the auto-generated descriptions, and have your team querying in Claude or ChatGPT, in about the time it takes to brew a pourover. Free for one user and one data source.

Get started for free, or talk to the founder.