To start using Elementary, you need to add our dbt package to your dbt project.

Video: How to install Elementary dbt package?

Step-by-step: Install Elementary dbt package


Add elementary to `packages.yml`

Add the following to your packages.yml file (if missing, create it where dbt_project.yml is):

  - package: elementary-data/elementary
    version: 0.15.2
    ## Docs:

Add to your `dbt_project.yml`

This means Elementary models will have their own schema. Depending on your project custom schema macro, the schema will be named elementary or <target_schema>_elementary. Make sure your user has permissions to create schemas.

  ## see docs:
    ## elementary models will be created in the schema '<your_schema>_elementary'
    +schema: "elementary"
    ## To disable elementary for dev, uncomment this:
    # enabled: "{{ in ['prod','analytics'] }}"

# Required from dbt 1.8 and above for certain Elementary features (please see more details above)
  require_explicit_package_overrides_for_builtin_materializations: false

Import the package and build Elementary models

dbt deps
dbt run --select elementary

This will mostly create empty tables, that will be updated with artifacts, metrics and test results in your future dbt executions.


Run tests

Validate the installation by running some tests:

dbt test

After you ran your tests, we recommend that you ensure that the results were loaded to elementary_test_results table.

What happens now?

Once the elementary dbt package has been installed and configured, your test results, run results and dbt artifacts will be loaded to elementary schema tables.

If you see data in these models you completed the package deployment (Congrats! 🎉).

What’s next?

Take a moment to ⭐️ star our Github repo! ⭐️ (It helps us a lot)

Then -

  1. Install the Elementary CLI 🤩
  2. Add data anomaly detection dbt tests 📈
  3. Deploy Elementary in production 🚀