<@U088WCP3B4P> when i run my dbt model i get eleme...
# ask-elementary-ai
a
@kapa.ai when i run my dbt model i get elementary.on-run-start and elementary.on-run-end, where are these comign from?
k
A message from kapa.ai
The elementary.on-run-start and elementary.on-run-end hooks are added by the Elementary dbt package. These hooks are configured in your dbt project when you install and set up Elementary for data observability. Their purpose is to collect and upload metadata and results from your dbt runs to tables in the Elementary schema, which are then used for monitoring, reporting, and alerting. - The on-run-start hook typically prepares the environment or schema for Elementary. - The on-run-end hook extracts data from the dbt run (such as results and metadata) and loads it into Elementary models for observability. These hooks are automatically triggered at the start and end of each dbt run, test, or build command when the Elementary package is installed and configured in your dbt project. You can see more details in the official documentation: [Elementary dbt package on-run-end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks) and [dbt artifacts](https://docs.elementary-data.com/dbt/dbt-artifacts).
a
@kapa.ai ok but i havent configured these anywhere in my project.
k
A message from kapa.ai
The elementary.on-run-start and elementary.on-run-end hooks are not something you typically configure manually in your own dbt_project.yml. When you install the Elementary dbt package (by adding it to your packages.yml and running dbt deps), these hooks are automatically included as part of the package’s own dbt_project.yml configuration. This means that even if you don’t see them in your project’s dbt_project.yml, they are still active because they are defined inside the Elementary package itself. This is a standard behavior for dbt packages: their hooks and configurations are merged into your project at runtime. That’s why you see elementary.on-run-start and elementary.on-run-end running, even though you haven’t explicitly added them yourself [Elementary dbt package on-run-end hooks](https://docs.elementary-data.com/dbt/on-run-end_hooks). If you want to control or disable these hooks, you can do so by setting specific variables in your dbt_project.yml, as described in the documentation.
a
@kapa.ai if i run an out of the box dbt test on a model (e.g unique and non-null), does elementary record this anywhere in its tables? When is this done after the model and tests are run
k
A message from kapa.ai
Yes, when you run an out-of-the-box dbt test (such as unique or not_null) on a model, Elementary records the results of these tests in its tables. Specifically: - The results of all dbt tests—including native dbt tests, dbt-expectations, dbt-utils, and Elementary tests—are stored in the
elementary_test_results
table. This includes information needed to generate the Elementary report, such as test status, metadata, and a sample of failed rows (if any) [dbt artifacts](https://docs.elementary-data.com/dbt/dbt-artifacts#dbt-artifacts-models) [Run results](https://docs.elementary-data.com/dbt/package-models#run-results). - The process of recording these results happens at the end of your dbt run or test, specifically during the
on-run-end
hook provided by the Elementary package. After your models and tests are executed, the Elementary
on-run-end
hook extracts the test results and uploads them to the relevant tables in your data warehouse [dbt artifacts](https://docs.elementary-data.com/dbt/dbt-artifacts) [Slack answer](https://slack.com/archives/C02CTC89LAX/p1693381395288719). So, you do not need to do anything special—just running your dbt tests with Elementary installed will ensure the results are captured and stored by Elementary after the tests complete.