- dbt tests are defined in your dbt project and run in your dbt pipeline. Elementary collects their results. You can add them in code or from the Elementary UI, which opens a pull request through your code repository integration.
- Cloud tests are defined in the Elementary UI and run by Elementary Cloud on their own schedule. SQL data tests and custom SQL tests query your warehouse directly, through Elementary Cloud or an Elementary Runtime.
Equivalent tests
How they compare
When to use cloud tests
Use a cloud test when:- You want coverage without a code change. Analysts, data stewards, and business users can add and tune tests in the UI with no pull request or dbt knowledge.
- The table isn’t in dbt. Cloud tests work on tables loaded by ingestion tools, other pipelines, or anything else in the warehouse.
- The test needs its own schedule. For example, check a source table hourly while your dbt jobs run daily, or check a table after an external load.
- You want to see results before you commit. The preview runs the test against your data and shows the failing rows before you save.
- Warehouse credentials must stay in your network. Run the tests through Elementary Runtime.
When to use dbt tests
Use a dbt test when:- A failure should stop the pipeline. Tests that run with
dbt buildcan prevent bad data from reaching downstream models and dashboards. - Test configuration must be version-controlled. The test lives next to the model, goes through code review, and is deployed with it.
- The test must run with every model change, including in CI on pull requests.
- The check needs a test type or warehouse that cloud tests don’t support, such as ephemeral models, BigQuery, or tests from dbt packages.
Defaults in the Elementary UI
When the environment has data access, Elementary suggests cloud tests first:- In the add-test flow, the test picker starts filtered on Elementary cloud. Switch the filter to dbt to add a dbt test instead.
- For custom query tests, the selector next to the page title defaults to Elementary Cloud (recommended). Choose dbt to open a pull request with a singular test. The dbt option requires a connected code repository.

