Install Elementary dbt package
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):
packages:
- package: elementary-data/elementary
version: 0.15.2
## Docs: https://docs.elementary-data.com
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.
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
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 -