> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meetsilicon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compilation

> Compile dbt or Silicon YAML models into explores and control compilation strictness

`silicon compile` builds dbt or native Silicon YAML models into explores and reports semantic errors, such as a metric referencing a dimension that does not exist.

Compilation also runs inside [`silicon validate`](https://docs.meetsilicon.com/workflow/cli/validate), [`silicon deploy`](https://docs.meetsilicon.com/workflow/cli/deploy), and [`silicon preview`](https://docs.meetsilicon.com/workflow/preview-projects), so the behaviour and flags on this page apply to those commands too.

For native projects, the CLI detects the [Silicon YAML project layout](https://docs.meetsilicon.com/semantic-layer/yaml.md#project-layout) and compiles without running dbt or loading a dbt profile. See [Validate your YAML](https://docs.meetsilicon.com/semantic-layer/yaml.md#step-3-validate-your-yaml) for the configuration and command. dbt selectors and warehouse-column probes do not apply to this path.

## Choose partial or strict compilation

Silicon uses **partial compilation** by default. Field, join, and set-validation failures that can be isolated are reported as warnings so the rest of the explore stays usable; failures that cannot be isolated can still produce errors.

Add `--no-partial-compilation` to report the failures that partial compilation would otherwise isolate as errors instead. It doesn't promote unrelated, non-blocking warnings -- other generic compilation warnings stay non-blocking.

If your project uses physical column references such as `${TABLE}.order_id`, add `--validate-warehouse-columns` to check supported unquoted references with warehouse queries that return no rows. It's opt-in because it sends those queries; whether your warehouse scans or bills for them is warehouse-dependent, and the check needs warehouse credentials and the warehouse catalog. Warehouse-column errors are reported whether partial compilation is on or off.

See the [CLI compilation options](https://docs.meetsilicon.com/workflow/cli/reference.md#partial-compilation) for the supported reference syntax and every skip condition.

To report the isolated failures as errors instead, use strict compilation:

```bash theme={null}
silicon compile --no-partial-compilation
```

Combine it with warehouse-column validation when your project uses physical references:

```bash theme={null}
silicon compile --no-partial-compilation --validate-warehouse-columns
```

## Compile a subset of your dbt models

If you only use a subset of your dbt models in Silicon, specify that subset with dbt selection syntax. For example, to only compile models with the tag `silicon`:

```bash theme={null}
silicon compile --select tag:silicon
```

See [`silicon compile`](https://docs.meetsilicon.com/workflow/cli/reference#silicon-compile) in the CLI reference for every option.

## Run compilation in CI

To run `silicon compile` on every pull request and catch errors before they're merged, use the compile workflow template. Follow [Compile your dbt project](https://docs.meetsilicon.com/workflow/set-up-ci-cd.md#compile-your-dbt-project) in Automate with CI/CD.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.