Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions references/integrations/dbt-projects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,22 @@ For ready-to-use workflow templates, see the [`lightdash/cli-actions`](https://g
</Accordion>
</AccordionGroup>

### `lightdash deploy` vs `lightdash refresh`

The two CLI commands above (`lightdash deploy` and `lightdash refresh`) are often confused. Here's the quick difference:

| | `lightdash deploy` | `lightdash refresh` |
| --- | --- | --- |
| **What it does** | Pushes your local dbt project to a Lightdash project. Runs `dbt compile` (or `dbt list`) locally to produce a fresh `manifest.json`, then sends the compiled models/explores to the Lightdash server. | Tells the Lightdash server to re-pull from the connected git remote and recompile, server-side. No local dbt run, no local files involved — it's the API-driven equivalent of clicking **Refresh dbt** in the UI. |
| **Where compilation happens** | Locally (laptop or CI runner) | Lightdash servers |
| **Requires a remote git connection?** | No | Yes |
| **Flags** | Many (`--project`, `--select`, `--full-refresh`, `--create`, `--use-batched-deploy`, etc.) | Essentially none (just `--verbose`) |
| **Use when** | You've changed dbt models or Lightdash YAML metadata locally and want those changes to land in a Lightdash project. | Lightdash already points at a git repo and you just want it to pull the latest. |

**Rule of thumb:**
- Local dbt code you want to push → `deploy`
- Lightdash already points at a git repo and you just want it to pull the latest → `refresh`

### Decision matrix

| | #1 `lightdash deploy` — local CLI | #2 `lightdash deploy` — CI | #3 "Refresh dbt" — UI button | #4 `lightdash refresh` — CI | #5 `POST /refresh` API — CI |
Expand Down