{"title":"Semantic Layer","description":"Define shared metrics, dimensions, and business concepts in Altertable for governed analytics and AI workflows.","order":100,"askSuggestions":["How do I enrich semantic models from dbt?","Why didn't dbt sync enrich my semantic model?","How do agents know which tables to prefer?"],"navigation":true,"body":{"code":"var Component=(()=>{var u=Object.create;var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),y=(s,e)=>{for(var t in e)a(s,t,{get:e[t],enumerable:!0})},o=(s,e,t,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let r of f(e))!b.call(s,r)&&r!==t&&a(s,r,{get:()=>e[r],enumerable:!(i=g(e,r))||i.enumerable});return s};var x=(s,e,t)=>(t=s!=null?u(p(s)):{},o(e||!s||!s.__esModule?a(t,\"default\",{value:s,enumerable:!0}):t,s)),k=s=>o(a({},\"__esModule\",{value:!0}),s);var c=w((j,d)=>{d.exports=_jsx_runtime});var A={};y(A,{default:()=>m,frontmatter:()=>v});var n=x(c()),v={title:\"Semantic Layer\",description:\"Define shared metrics, dimensions, and business concepts in Altertable for governed analytics and AI workflows.\",order:100,askSuggestions:[\"How do I enrich semantic models from dbt?\",\"Why didn't dbt sync enrich my semantic model?\",\"How do agents know which tables to prefer?\"]};function l(s){let e={a:\"a\",code:\"code\",h1:\"h1\",h2:\"h2\",li:\"li\",p:\"p\",strong:\"strong\",ul:\"ul\",...s.components},{DocsPreviewDocument:t,DocsPreviewSection:i}=e;return t||h(\"DocsPreviewDocument\",!0),i||h(\"DocsPreviewSection\",!0),(0,n.jsxs)(t,{anchors:\"semantic-layer what-a-model-contains where-models-are-used enrich-models-from-dbt learn-more\",children:[(0,n.jsxs)(i,{sectionId:\"semantic-layer\",anchors:\"\",ancestors:\"\",index:\"0\",children:[(0,n.jsx)(e.h1,{id:\"semantic-layer\",children:\"Semantic Layer\"}),`\n`,(0,n.jsx)(e.p,{children:\"The semantic layer defines business-friendly models over lakehouse tables. It gives teams and AI agents shared names for measures, dimensions, timestamps, filters, and relationships so the same metric is computed the same way everywhere.\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"For reusable business calculations, use \",(0,n.jsx)(e.a,{href:\"/docs/agents/knowledge/metrics\",children:\"Metrics\"}),\" in \",(0,n.jsx)(e.strong,{children:\"Knowledge\"}),\". Table metadata and endorsement are managed in \",(0,n.jsx)(e.strong,{children:\"Catalogs\"}),\". The dedicated Semantic Layer editor is no longer available, and semantic models cannot be added as new chat context; existing references can still be displayed.\"]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"what-a-model-contains\",anchors:\"\",ancestors:\"\",index:\"1\",children:[(0,n.jsx)(e.h2,{id:\"what-a-model-contains\",children:\"What a model contains\"}),`\n`,(0,n.jsx)(e.p,{children:\"A semantic model is attached to a table or view and can define:\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Measures\"}),\": aggregations such as revenue, active users, order count, or average latency.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Dimensions\"}),\": fields used for grouping and filtering, such as plan, region, customer tier, or status.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Timestamps\"}),\": time fields used for trends and time grains.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Relations\"}),\": joins to other models so analyses can cross business entities.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Formatting\"}),\": display hints such as currency, percentages, and date formats.\"]}),`\n`]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"where-models-are-used\",anchors:\"\",ancestors:\"\",index:\"2\",children:[(0,n.jsx)(e.h2,{id:\"where-models-are-used\",children:\"Where models are used\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"Semantic models provide business definitions for Ask Altertable, data apps, tasks, and connected clients. They also make data discovery easier because important tables carry explicit business meaning. Each model also carries an \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/endorsement\",children:\"endorsement\"}),\" status that tells agents which tables to prefer.\"]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"enrich-models-from-dbt\",anchors:\"\",ancestors:\"\",index:\"3\",children:[(0,n.jsx)(e.h2,{id:\"enrich-models-from-dbt\",children:\"Enrich models from dbt\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"A connected dbt knowledge repository can enrich existing models with descriptions, column metadata, supported measures and dimensions, and relationships. For Git-based sync, commit \",(0,n.jsx)(e.code,{children:\"target/manifest.json\"}),\" in the dbt project and sync the repository to apply this enrichment.\"]}),`\n`,(0,n.jsxs)(e.p,{children:[\"For this enrichment, models must already exist in Altertable and match the manifest's catalog, schema, and table names. See the \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/modeling/dbt#enrich-existing-semantic-models\",children:\"dbt integration\"}),\" for setup and limitations.\"]}),`\n`,(0,n.jsxs)(e.p,{children:[\"See \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/modeling/dbt#which-files-need-to-be-committed\",children:\"dbt artifact requirements\"}),\" to make generated metric definitions available as knowledge.\"]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"learn-more\",anchors:\"\",ancestors:\"\",index:\"4\",children:[(0,n.jsx)(e.h2,{id:\"learn-more\",children:\"Learn more\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:(0,n.jsx)(e.a,{href:\"/docs/agents/ask\",children:\"Ask Altertable\"})}),\": ask natural-language questions over models and data.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:(0,n.jsx)(e.a,{href:\"/docs/agents/knowledge/entries\",children:\"Knowledge entries\"})}),\": add supporting business documentation.\"]}),`\n`]})]})]})}function m(s={}){let{wrapper:e}=s.components||{};return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(l,{...s})}):l(s)}function h(s,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+s+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return k(A);})();\n;return Component;"},"_id":"docs/agents/knowledge/semantic-layer.mdx","_raw":{"sourceFilePath":"docs/agents/knowledge/semantic-layer.mdx","sourceFileName":"semantic-layer.mdx","sourceFileDir":"docs/agents/knowledge","contentType":"mdx","flattenedPath":"docs/agents/knowledge/semantic-layer"},"type":"Docs","path":"/agents/knowledge/semantic-layer","level":3,"parent":"agents/knowledge"}