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

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.16.1
    ## 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 macro, the schema will be named elementary or <target_schema>_elementary. Make sure your user has permissions to create schemas.

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'] }}"

# Required from dbt 1.8 and above for certain Elementary features
flags:
  require_explicit_package_overrides_for_builtin_materializations: False
  source_freshness_run_project_hooks: True
3

Import the package and build Elementary models

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

4

Run tests

Validate the installation by running some tests:

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