Skip to content

Commit 6859fac

Browse files
committed
adding dbt-less ligthdash page
1 parent dac74e2 commit 6859fac

3 files changed

Lines changed: 155 additions & 1 deletion

File tree

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
"pages": [
208208
"references/integrations",
209209
"references/integrations/dbt-projects",
210+
"references/integrations/dbt-less",
210211
"references/integrations/slack-integration",
211212
"references/integrations/google-sheets",
212213
"references/integrations/lightdash-mcp"

guides/lightdash-semantic-layer.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Tables represent important business objects like customers, orders, or products.
3939
Lightdash's semantic layer works with your existing data warehouse through four key steps:
4040

4141
1. **Data warehouse connection:** Lightdash connects directly to tables or views in your data warehouse.
42-
2. **YAML configuration:** You define your semantic layer through YAML configuration files that specify metrics, dimensions, and their relationships. This approach makes definitions transparent, version-controllable, and easy to maintain.
42+
2. **YAML configuration:** You define your semantic layer through YAML configuration files that specify metrics, dimensions, and their relationships. This approach makes definitions transparent, version-controllable, and easy to maintain. You can define your semantic layer within a [dbt project](/references/integrations/dbt-projects) or use [dbt-less Lightdash](/references/integrations/dbt-less) if you don't have dbt.
4343
3. **Metadata enrichment:** Lightdash lets you add business-friendly labels, descriptions, and formatting to make the data easier to understand. This metadata turns technical fields into business concepts.
4444
4. **Dynamic query generation:** When users interact with the semantic layer, Lightdash automatically generates optimized SQL queries, handling all the complexity of joins, aggregations, and filters behind the scenes.
4545

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
---
2+
title: "dbt-less Lightdash"
3+
sidebarTitle: dbt-less
4+
description: "Use Lightdash without a dbt project by defining your semantic layer directly in YAML files."
5+
---
6+
7+
<Frame>
8+
<iframe width="100%" height="420" src="https://www.loom.com/embed/9996f4b7e4574ec098fabb6db824115e" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen />
9+
</Frame>
10+
11+
## What is dbt-less Lightdash?
12+
13+
dbt-less Lightdash allows you to use Lightdash without an existing dbt project. Instead of defining your semantic layer within dbt model YAML files, you define it directly in standalone YAML files that point to tables in your data warehouse.
14+
15+
This approach lets you leverage Lightdash's powerful features—like the semantic layer, AI agents, and self-service analytics—without needing to adopt dbt first.
16+
17+
## Why use dbt-less Lightdash?
18+
19+
Lightdash has always operated with dbt at its core. Traditionally, customers have active dbt projects, and Lightdash builds its semantic layer within that dbt context.
20+
21+
However, not every team uses dbt. If you're interested in Lightdash features like:
22+
23+
- **AI agents** that can answer questions about your data
24+
- **A semantic layer** with consistent metric definitions
25+
- **Self-service analytics** for your business users
26+
27+
...but you don't have dbt set up, dbt-less Lightdash provides a path forward. You can define your semantic layer directly and start using Lightdash immediately, without the overhead of adopting dbt.
28+
29+
<Info>
30+
dbt is open source, so using dbt-less Lightdash isn't about avoiding a paid solution—it's about meeting you where you are in your data stack journey.
31+
</Info>
32+
33+
## dbt vs dbt-less: which should you use?
34+
35+
| Scenario | Recommendation |
36+
|----------|----------------|
37+
| You already have a dbt project | Use the standard [dbt integration](/references/integrations/dbt-projects) |
38+
| You're planning to adopt dbt soon | Consider setting up dbt first, then connecting to Lightdash |
39+
| You don't use dbt and want to try Lightdash quickly | Use dbt-less Lightdash |
40+
| You want AI agents or semantic layer features without dbt | Use dbt-less Lightdash |
41+
| You have tables in your warehouse ready to explore | Use dbt-less Lightdash |
42+
43+
The good news: if you start with dbt-less Lightdash and later decide to adopt dbt, the YAML format is similar enough that migration is straightforward.
44+
45+
## Getting started with dbt-less Lightdash
46+
47+
### Prerequisites
48+
49+
Before you begin, make sure you have:
50+
51+
1. The [Lightdash CLI installed](/guides/cli/how-to-install-the-lightdash-cli)
52+
2. [Authenticated with Lightdash](/guides/cli/cli-authentication)
53+
3. Credentials for your data warehouse (e.g., Snowflake)
54+
4. Tables in your warehouse that you want to explore
55+
56+
### Step 1: Create your first model
57+
58+
Create a directory structure for your Lightdash project:
59+
60+
```bash
61+
mkdir -p lightdash/models
62+
```
63+
64+
Create a YAML file for your first model. For example, `./lightdash/models/users.yml`:
65+
66+
```yaml
67+
version: 2
68+
69+
models:
70+
- name: users
71+
meta:
72+
sql_from: my_database.my_schema.users # Update this to your table name
73+
columns:
74+
- name: user_id
75+
meta:
76+
dimension:
77+
type: string
78+
- name: email
79+
meta:
80+
dimension:
81+
type: string
82+
- name: created_at
83+
meta:
84+
dimension:
85+
type: timestamp
86+
- name: user_id
87+
meta:
88+
metrics:
89+
total_users:
90+
type: count_distinct
91+
```
92+
93+
Update the configuration:
94+
95+
- Set `sql_from` to the fully qualified name of your table (e.g., `database.schema.table`)
96+
- Update the dimensions to match the columns in your table
97+
- Add metrics that make sense for your data
98+
99+
### Step 2: Validate your YAML
100+
101+
Check your YAML files for errors by running:
102+
103+
```bash
104+
lightdash lint
105+
```
106+
107+
This command validates your configuration and reports any issues before you deploy.
108+
109+
### Step 3: Deploy your project
110+
111+
Create your Lightdash project by deploying with the CLI:
112+
113+
```bash
114+
lightdash deploy --create --no-warehouse-credentials
115+
```
116+
117+
The `--no-warehouse-credentials` flag tells Lightdash that you're using dbt-less mode and will configure warehouse credentials separately in the Lightdash UI.
118+
119+
### Step 4: Update your project
120+
121+
After your initial deployment, you can edit your `.yml` files and redeploy changes:
122+
123+
```bash
124+
lightdash deploy --no-warehouse-credentials
125+
```
126+
127+
## Developing with AI copilots
128+
129+
If you're developing with Cursor, Claude Code, Kilo Code, or another AI copilot, you can speed up your workflow significantly.
130+
131+
### Recommended setup
132+
133+
1. **Provide the schema reference:** Give your copilot this link to the Lightdash YAML format specification:
134+
```
135+
https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/common/src/schemas/json/model-as-code-1.0.json
136+
```
137+
138+
2. **Use validation:** Prompt your copilot to always run `lightdash lint` after making any changes to catch errors early.
139+
140+
3. **Share your warehouse schema:** Give your copilot access to your warehouse schema. This makes it very fast to generate YAML files that match your actual table structures.
141+
142+
<Tip>
143+
With access to your warehouse schema, AI copilots can auto-generate dimension and metric definitions for entire tables in seconds.
144+
</Tip>
145+
146+
## Next steps
147+
148+
Once you've deployed your dbt-less project:
149+
150+
- [Explore your data](/get-started/exploring-data/using-explores) in the Lightdash UI
151+
- [Create metrics](/get-started/develop-in-lightdash/how-to-create-metrics) to define your key business calculations
152+
- [Set up AI agents](/guides/ai-agents) to enable natural language queries
153+
- Learn about the [semantic layer reference](/references/metrics) for advanced configuration options

0 commit comments

Comments
 (0)