To start using Elementary to monitor you tests, executions and data, you need to add our dbt package to your dbt project.

How to install Elementary dbt package?

Install dbt package

1. Add elementary to packages.yml

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

packages.yml
packages:
  - package: elementary-data/elementary
    version: 0.10.2
    ## Docs: https://docs.elementary-data.com

2. Add to your dbt_project.yml

This means Elementary models will have their own schema. Depending on your project custom schema rules (see dbt custom schema docs), the schema will be named elementary or <target_schema>_elementary (being <target_schema> = analytics very often).

Make sure your user (or the orchestrator user) has permissions to create schemas. If not, ask your admin to create both schemas and grant permissions to the relevant users / groups.

dbt_project.yml
models:
  ## see docs: https://docs.elementary-data.com/
  elementary:
    ## elementary models will be created in the schema '<your_schema>_elementary'
    +schema: "elementary"
    ## To disable elementary for dev, uncomment this:
    # enabled: "{{ target.name in ['prod','analytics'] }}"

3. Import the package

Terminal
dbt deps

4. Run to create the package models

Terminal
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.

5. Run tests

Terminal
dbt test

You can also run only some tests. Only tests you run after the installation will show up in the UI.

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. Try Elementary Cloud or Install the Elementary CLI 🤩
  2. Add data anomaly detection dbt tests 📈
  3. Deploy Elementary in production 🚀