Emanuele De Sanctis
09/09/2025, 8:58 AMkapa.ai
09/09/2025, 8:58 AMkapa.ai
09/09/2025, 8:58 AM--vars '{debug_logs: true}' This will provide more detailed output in your dbt.log file, helping you pinpoint exactly where the failure occurs in the on-run-end hook. Trusted support staff have recommended this approach to help track on-run-end performance and detect bottlenecks. You can then review the dbt.log file to see which macro or operation is failing during the hook execution [source](https://slack.com/archives/C02CTC89LAX/p1701964099213789). 2. Review the dbt.log File: The dbt.log file contains detailed logs of each step dbt and Elementary perform, including the execution of on-run-end hooks. Look for lines related to "elementary.on-run-end" and any error messages or stack traces that follow. This will help you identify the specific step or macro that is failing [source](https://slack.com/archives/C02CTC89LAX/p1707739858666469). 3. Understand What the Hooks Do: The on-run-end hooks in Elementary perform several actions, such as uploading metadata about your dbt resources, run results, and invocation details to tables in your warehouse. The hooks are composed of several macros, each responsible for a different part of the process. You can see the structure of these hooks in the Elementary dbt package code, specifically in the on_run_end.sql macro [source](https://slack.com/archives/C02CTC89LAX/p1676591086232199). 4. Check for Known Issues: If you see errors related to mismatched columns or missing tables, it may be due to a version mismatch or a recent update that requires you to rebuild the Elementary models (e.g., by running dbt run -s elementary) [source](https://slack.com/archives/C02CTC89LAX/p1707739858666469). By following these steps, you should be able to get a clearer picture of what the on-run-end hooks are doing and where the failure is occurring. If you need further help, sharing your dbt.log with the Elementary support team can also assist in diagnosing the issue.