Portfolio

Data Portfolio

Data projects — semantic layers, natural language querying, and BI tooling.

Revenue Semantic Layer Chatbot - Ask revenue questions in plain English
✦ Live Demo

The chatbot parses the question to Snowflake's Cortex Analyst which in turn parses natural language into an SQL query on the semantic views scoped to whichever role you select — Finance sees recognized revenue, Marketing sees attributed revenue.


Stack

Snowflake Semantic Views Cortex Analyst Claude API Vercel Tableau Public

𝐒𝐤𝐢𝐥𝐥𝐬 𝐝𝐞𝐦𝐨𝐧𝐬𝐭𝐫𝐚𝐭𝐞𝐝: Setting up Snowflake warehouse, database, schemas, user roles, service account, semantic views, cost controls, warehouse suspension rules. Ability to persist through a long debugging chain involving multiple tech layers.

What this demonstrates

A native Snowflake Semantic View per department (Finance / Marketing), each exposing a shared gross_revenue metric identically defined, plus a department-specific metric. For this showcase, finance_revenue is net of discounts, completed refunds and excludes cancelled orders. Marketing_revenue is net of discounts.
Role selection in the chat UI maps to a real Snowflake role: (FIN_RPT / MKTG_RPT) — the access boundary is enforced by Snowflake grants.

How it works

  • Snowflake's Cortex Analyst interprets the question against the active role's semantic view and generates the SQL natively
  • That SQL executes on a Snowflake connection bound to that role's grants — the real access-control enforcement point
  • Claude turns the result rows into a plain-language answer
  • The Tableau crosstab alongside it displays the source-of-truth.

Daily limit for each user is set to 3 questions only. A total daily limit is also in place.
Best viewed on desktop.

Chatbot Live

Ask something like “what was gross revenue in June?” The role selected above determines which semantic view answers it.

Revenue Crosstab (Tableau) - Check the Numbers Here