Docs updates - #9830
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
runleonarun
left a comment
There was a problem hiding this comment.
@matthewshaver Just a few questions!
| - `dbt run` | ||
| - `dbt parse` | ||
| - `dbt compile` | ||
| Instead of loading a static `manifest.json` in the browser, v2 builds a compact binary index of your project. `dbt docs generate` exports a documentation site made of plain static files (a single-page app plus the index artifacts) that any file host can serve. The browser reads those artifacts directly using DuckDB-WASM, so you don't need to run a stateful server to view your docs. This keeps the experience fast even for large projects. |
There was a problem hiding this comment.
Can we link to something that explains DuckDB-WASM? Or at least spell out WASM for those of us who don't know it stands for WebAssembly.
| dbt docs generate | ||
| ``` | ||
|
|
||
| By default, dbt writes the site into your `target/` directory (`target/index.html`, `target/assets/`, and the index under `target/index/`), matching the layout of <Constant name="core_v1" />. You can serve `index.html` from `target/` the same way you did in v1, so existing CI such as `dbt docs generate && mv target public` continues to work. |
There was a problem hiding this comment.
matching the layout of
Do you mean Docs v1?
There was a problem hiding this comment.
v1 in this case is referring to Core v1 but they're sort of synonymous at this stage
| ``` | ||
|
|
||
| When running <Constant name="fusion" /> locally, add the `--write-catalog` flag to your command to generate the catalog: | ||
| To skip compilation and export whatever index is already on disk, use `--no-compile`. This errors if no index exists: |
There was a problem hiding this comment.
| To skip compilation and export whatever index is already on disk, use `--no-compile`. This errors if no index exists: | |
| To skip compilation and export whatever index is already on disk, use `--no-compile`, which fails with an error if no index exists: |
| ### REST API | ||
| ### Platform behavior | ||
|
|
||
| In <Constant name="dbt_platform" /> jobs running on <Constant name="fusion" />, you don't need to change anything. When `dbt docs generate` is called (either as a job step or separate command), the platform automatically uses `--write-catalog` instead. Additionally, for <Constant name="fusion" /> jobs running in the platform, dbt runs `write-catalog` automatically with `build` or `run`, so you don't need to run a separate command to hydrate your metadata. In the platform, you can optionally choose to include it when running `dbt parse` or `dbt compile`. |
There was a problem hiding this comment.
the platform automatically uses
--write-cataloginstead.
Instead of generating the docs site? I'm confused because I thought --write-catalog "focuses solely on metadata hydration and does not build the documentation site" But I also thought docs generate builds the docs v2 site in dbt platform?
There was a problem hiding this comment.
@eliasdefaria good question here. ARe the changes you've made explicitly for the local experience? Does anything change platform side?
There was a problem hiding this comment.
Platform side should just work if you run docs generate or turn it on in your jobs. Otherwise it does not produce the static site
| <VersionBlock firstVersion="2.0"> | ||
|
|
||
| Using the <Constant name="fusion_engine" />, dbt Docs v2 replaces the v1 static site with a modern, performant catalog served through a local REST API. To generate and serve documentation: | ||
| Using the <Constant name="fusion_engine" />, dbt Docs v2 replaces the v1 static site with a modern, performant catalog. `dbt docs generate` writes a static site — a single-page app plus a compact binary index — that the browser queries directly with DuckDB-WASM, so you don't need a server to view it. To generate and serve documentation: |
There was a problem hiding this comment.
It's not a compact binary index I don't know what that is.
It writes a static site + plus compiles the project and produces the new v2 parquet artifacts.
| ```bash | ||
| DBT_TARGET_PATH=/abs/path/to/project/target docker compose up --build | ||
| ``` | ||
| To include column-level lineage and richer column metadata, first build the index with [`--static-analysis strict`](https://docs.getdbt.com/docs/build/about-static-analysis?version=1.13), then export it: |
There was a problem hiding this comment.
We should be clear about what to run here. Specifically dbt compile --write-index --static-analysis strict.
You can also note that we are making CLL work in baseline mode, so soon CLL will work when you run dbt docs generate alone
There was a problem hiding this comment.
I see you have build below, so you can also mention that as an option
|
|
||
| ### dbt Docs v2 | ||
|
|
||
| v2 introduces [dbt Docs v2](/docs/build/view-documentation#dbt-docs-v2), a faster, statically hostable documentation experience that replaces the v1 static site. `dbt docs generate` now compiles your project, writes a compact binary index, and exports a static site in a single command — you no longer run `--write-index` separately. `dbt docs serve` previews that site locally, and because the browser queries the index directly with DuckDB-WASM, you can also host the generated files on any static file host. |
There was a problem hiding this comment.
Again no binary index.
Also can we make this more future proofed? We don't need to imply that previously you had to do --write-index. We can just say --write-index is only necessary if you want to produce the artifacts from a dbt compile or dbt build command
| - `dbt run` | ||
| - `dbt parse` | ||
| - `dbt compile` | ||
| Instead of loading a static `manifest.json` in the browser, v2 builds a compact binary index of your project. `dbt docs generate` exports a documentation site made of plain static files (a single-page app plus the index artifacts) that any file host can serve. The browser reads those artifacts directly using DuckDB-WASM, so you don't need to run a stateful server to view your docs. This keeps the experience fast even for large projects. |
There was a problem hiding this comment.
Again no company binary index. It just produces the parquet artifacts instead of manifest json
| ### REST API | ||
| ### Platform behavior | ||
|
|
||
| In <Constant name="dbt_platform" /> jobs running on <Constant name="fusion" />, you don't need to change anything. When `dbt docs generate` is called (either as a job step or separate command), the platform automatically uses `--write-catalog` instead. Additionally, for <Constant name="fusion" /> jobs running in the platform, dbt runs `write-catalog` automatically with `build` or `run`, so you don't need to run a separate command to hydrate your metadata. In the platform, you can optionally choose to include it when running `dbt parse` or `dbt compile`. |
There was a problem hiding this comment.
Platform side should just work if you run docs generate or turn it on in your jobs. Otherwise it does not produce the static site
What are you changing in this pull request and why?
Updates the dbt docs command reference (Fusion v2.0 section) to reflect recent dbt-labs/fs changes and to lead with dbt Docs v2 as the recommended solution, followed by --write-catalog.
Key changes:
Checklist
🚀 Deployment available! Here are the direct links to the updated files: