Amir B.
08/06/2024, 9:23 AMpackages.yml (& run dbt deps)
◦ add config in dbt_project.yml
◦ run dbt run --select elementary (successful run, all models are materialized in the target elementary schema)
◦ run dbt build
Unfortunately, elementary tables only contain data related to elementary objects, for example DBT_RUN_RESULTS only contains 28 rows, all of them being about elementary models.
Of course, when I try to generate the report, it ends up empty.
Does someone know what could be the possible causes ? Thank you in advance.
Environment :
• dbt-core & dbt-snowflake 1.8
• elementary 0.15.2Larissa Mendes Hermogenes Rocha
08/06/2024, 4:36 PMdata_monitoring_metrics table maybe you'll see if there are any tests results... perhaps dbt build is not pointing to the right target?Amir B.
08/06/2024, 6:41 PMdata_monitoring_metrics table is empty.
The dbt build is pointing to the right target because my project tables (mine, not the elementary ones) are updated, but this is not reflected in elementary tables & views.
The dbt_sources , dbt_models , dbt_tests contains data about my sources, models & tests respectively, but no data about model runs & tests execution, except the elementary models.Larissa Mendes Hermogenes Rocha
08/07/2024, 11:49 AMAmir B.
08/07/2024, 12:16 PMAmir B.
08/07/2024, 12:18 PMdbt build to rebuild all models and run all tests. It looks like when the first on-run-end hooks fails, the second (the one defined by elementary) isn't triggered. I tried running dbt build while selecting a subset of models, I got no errors in both on-run-end hooks and elementary models are successfully updated with the related data. I don't know if the cause of the issue in the first dbt build is the failure of the first on-run-end hooks or just the number of models (around 250).
• It isn't clear to me if I should exclude elementary models from selection when running dbt build / dbt run in my data pipeline and let only the on-run-hook handle the inserts, or are elementary models supposed to be run every time we run dbt build in our data pipelines. Here (link to elementary doc) it says that we should run dbt run --select elementary every time models are added/updated so we plan to add this step in our CI but I don't know if they are also supposed to run in our data pipelines.
• Even though the second dbt build (the one selecting a subset of models) worked and successfully inserted records in elementary tables, when I try to regenerate the report, it's still empty. I get a warning about version incompatibility between elementary dbt package and elementary CLI (respectively 0.15.2 and 0.16), I don't know if that's the cause, will try to fix version and retry.Amir B.
08/08/2024, 1:19 PMdbt run --select elementary --full-refresh and finally a dbt build --select a_model_with_tests .
I can see the elementary tables are updated and contains data related to the dbt run and tests. The report generation also works now and contains the previously mentioned dbt run and tests.
The only blurry point left is when running a dbt build command without selecting models ; that still doesn't update elementary tables and show up in reports.
We need to understand if it's caused by
• the fact that a failure in our on-run-end hook causes the failure of elementary on-run-end hook. I think theres an open issue in the dbt-core repo related to that (see https://github.com/dbt-labs/dbt-core/issues/7387)
• the volume of data to be inserted in elementary tables at once
Anyway thank you for the help @Larissa Mendes Hermogenes Rocha ! 🙏Larissa Mendes Hermogenes Rocha
08/09/2024, 12:01 PMLarissa Mendes Hermogenes Rocha
08/09/2024, 12:07 PM