Hi folks, I’m struggling to get elementary to work...
# community-support
s
Hi folks, I’m struggling to get elementary to work with
dbt-core=1.8.2
,
dbt-snowflake=1.8.3
and
elementary-data=0.15.1
. Specifically, after I run
dbt run -s elementary
my
MODEL_RUN_RESULTS
table has 0 rows. If I then run the model standalone (i.e. ``dbt run -s model_run_results` ) the table gets populated as expected. Any idea what I might be doing wrong? Ideally, I would only need to run
dbt run -s elementary
, thx 🙂
👀 1
Here’re the logs from
dbt run -s elementary
- they look like the
MODEL_RUN_RESULTS
model gets built just fine, but the table is empty
Copy code
(venv) vscode@28565cc4956d:/workspace/dbt$ dbt build -s elementary --target prod
17:00:13  Running with dbt=1.8.2
17:00:14  Registered adapter: snowflake=1.8.3
17:00:14  [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 2 unused configuration paths:
- models.taktile_analytics.prod.dimensions.sales_and_marketing
- models.taktile_analytics.prod.facts.sales_and_marketing
17:00:15  Found 119 models, 943 data tests, 4 seeds, 4 operations, 49 sources, 1558 macros
17:00:15  
17:00:20  
17:00:20  Running 1 on-run-start hook
17:00:22  1 of 1 START hook: elementary.on-run-start.0 ................................... [RUN]
17:00:22  1 of 1 OK hook: elementary.on-run-start.0 ...................................... [OK in 0.00s]
17:00:22  
17:00:23  Concurrency: 4 threads (target='prod')
17:00:23  
17:00:23  1 of 28 START sql table model AUDIT.data_monitoring_metrics .................... [RUN]
17:00:23  2 of 28 START sql table model AUDIT.dbt_columns ................................ [RUN]
17:00:23  3 of 28 START sql table model AUDIT.dbt_exposures .............................. [RUN]
17:00:23  4 of 28 START sql table model AUDIT.dbt_invocations ............................ [RUN]
17:00:25  4 of 28 OK created sql table model AUDIT.dbt_invocations ....................... [SUCCESS 1 in 2.01s]
17:00:25  5 of 28 START sql table model AUDIT.dbt_metrics ................................ [RUN]
17:00:25  1 of 28 OK created sql table model AUDIT.data_monitoring_metrics ............... [SUCCESS 1 in 2.13s]
17:00:25  6 of 28 START sql table model AUDIT.dbt_models ................................. [RUN]
17:00:25  3 of 28 OK created sql table model AUDIT.dbt_exposures ......................... [SUCCESS 1 in 2.83s]
17:00:25  7 of 28 START sql table model AUDIT.dbt_run_results ............................ [RUN]
17:00:27  5 of 28 OK created sql table model AUDIT.dbt_metrics ........................... [SUCCESS 1 in 2.77s]
17:00:27  7 of 28 OK created sql table model AUDIT.dbt_run_results ....................... [SUCCESS 1 in 1.95s]
17:00:28  8 of 28 START sql table model AUDIT.dbt_seeds .................................. [RUN]
17:00:28  9 of 28 START sql table model AUDIT.dbt_snapshots .............................. [RUN]
17:00:31  9 of 28 OK created sql table model AUDIT.dbt_snapshots ......................... [SUCCESS 1 in 3.26s]
17:00:31  10 of 28 START sql table model AUDIT.dbt_source_freshness_results .............. [RUN]
17:00:32  6 of 28 OK created sql table model AUDIT.dbt_models ............................ [SUCCESS 1 in 7.01s]
17:00:32  11 of 28 START sql table model AUDIT.dbt_sources ............................... [RUN]
17:00:34  10 of 28 OK created sql table model AUDIT.dbt_source_freshness_results ......... [SUCCESS 1 in 2.67s]
17:00:34  12 of 28 START sql table model AUDIT.dbt_tests ................................. [RUN]
17:00:34  8 of 28 OK created sql table model AUDIT.dbt_seeds ............................. [SUCCESS 1 in 6.52s]
17:00:34  13 of 28 START sql table model AUDIT.elementary_test_results ................... [RUN]
17:00:36  13 of 28 OK created sql table model AUDIT.elementary_test_results .............. [SUCCESS 1 in 2.10s]
17:00:36  14 of 28 START sql table model AUDIT.metadata .................................. [RUN]
17:00:37  2 of 28 OK created sql table model AUDIT.dbt_columns ........................... [SUCCESS 1 in 14.34s]
17:00:37  15 of 28 START sql table model AUDIT.schema_columns_snapshot ................... [RUN]
17:00:38  14 of 28 OK created sql table model AUDIT.metadata ............................. [SUCCESS 1 in 1.95s]
17:00:38  16 of 28 START sql table model AUDIT.job_run_results ........................... [RUN]
17:00:39  11 of 28 OK created sql table model AUDIT.dbt_sources .......................... [SUCCESS 1 in 6.92s]
17:00:39  17 of 28 START sql table model AUDIT.metrics_anomaly_score ..................... [RUN]
17:00:39  15 of 28 OK created sql table model AUDIT.schema_columns_snapshot .............. [SUCCESS 1 in 1.85s]
17:00:39  18 of 28 START sql table model AUDIT.monitors_runs ............................. [RUN]
17:00:41  17 of 28 OK created sql table model AUDIT.metrics_anomaly_score ................ [SUCCESS 1 in 2.23s]
17:00:41  19 of 28 START sql table model AUDIT.snapshot_run_results ...................... [RUN]
17:00:41  16 of 28 OK created sql table model AUDIT.job_run_results ...................... [SUCCESS 1 in 2.71s]
17:00:41  20 of 28 START sql table model AUDIT.model_run_results ......................... [RUN]
17:00:42  18 of 28 OK created sql table model AUDIT.monitors_runs ........................ [SUCCESS 1 in 2.52s]
17:00:42  21 of 28 START sql table model AUDIT.alerts_anomaly_detection .................. [RUN]
17:00:43  19 of 28 OK created sql table model AUDIT.snapshot_run_results ................. [SUCCESS 1 in 2.26s]
17:00:43  22 of 28 START sql table model AUDIT.alerts_dbt_tests .......................... [RUN]
17:00:44  20 of 28 OK created sql table model AUDIT.model_run_results .................... [SUCCESS 1 in 2.30s]
17:00:44  23 of 28 START sql table model AUDIT.alerts_schema_changes ..................... [RUN]
17:00:44  21 of 28 OK created sql table model AUDIT.alerts_anomaly_detection ............. [SUCCESS 1 in 2.17s]
17:00:44  24 of 28 START sql table model AUDIT.test_result_rows .......................... [RUN]
17:00:46  23 of 28 OK created sql table model AUDIT.alerts_schema_changes ................ [SUCCESS 1 in 2.10s]
17:00:46  25 of 28 START sql table model AUDIT.alerts_dbt_source_freshness ............... [RUN]
17:00:46  22 of 28 OK created sql table model AUDIT.alerts_dbt_tests ..................... [SUCCESS 1 in 2.52s]
17:00:46  26 of 28 START sql table model AUDIT.anomaly_threshold_sensitivity ............. [RUN]
17:00:46  24 of 28 OK created sql table model AUDIT.test_result_rows ..................... [SUCCESS 1 in 2.14s]
17:00:46  27 of 28 START sql table model AUDIT.alerts_dbt_models ......................... [RUN]
17:00:51  25 of 28 OK created sql table model AUDIT.alerts_dbt_source_freshness .......... [SUCCESS 1 in 1.70s]
17:00:51  26 of 28 OK created sql table model AUDIT.anomaly_threshold_sensitivity ........ [SUCCESS 1 in 1.58s]
17:00:51  27 of 28 OK created sql table model AUDIT.alerts_dbt_models .................... [SUCCESS 1 in 1.69s]
17:00:51  12 of 28 OK created sql table model AUDIT.dbt_tests ............................ [SUCCESS 1 in 14.32s]
17:00:51  28 of 28 START sql table model AUDIT.dbt_artifacts_hashes ...................... [RUN]
17:00:54  28 of 28 OK created sql table model AUDIT.dbt_artifacts_hashes ................. [SUCCESS 1 in 3.32s]
17:00:54  
17:00:54  Running 3 on-run-end hooks
17:00:54  Centralizing 28 model executions in AUDIT.fct_dbt_model_execution_tmp -> AUDIT.fct_dbt_model_execution
17:00:54  1 of 3 START hook: taktile_analytics.on-run-end.0 .............................. [RUN]
17:00:57  1 of 3 OK hook: taktile_analytics.on-run-end.0 ................................. [SUCCESS 28 in 2.60s]
17:00:57  2 of 3 START hook: taktile_analytics.on-run-end.1 .............................. [RUN]
17:00:57  2 of 3 OK hook: taktile_analytics.on-run-end.1 ................................. [OK in 0.00s]
17:00:59  3 of 3 START hook: elementary.on-run-end.0 ..................................... [RUN]
17:00:59  3 of 3 OK hook: elementary.on-run-end.0 ........................................ [OK in 0.00s]
17:00:59  
17:01:00  
17:01:00  Finished running 28 table models, 4 project hooks in 0 hours 0 minutes and 44.28 seconds (44.28s).
17:01:01  
17:01:01  Completed successfully
17:01:01  
17:01:01  Done. PASS=28 WARN=0 ERROR=0 SKIP=0 TOTAL=28
m
Same issue here @Maayan Salom Would appreciate a helping hand 🙂
m
@Mads Christensen It should be empty on the first run. The data is written to these tables starting from the next execution, when there are run results to add to the tables.
m
@Maayan Salom Ive have been running the commands a hundred times by now But the table keeps being empty ☺️
m
@Simon Rosenberger @Mads Christensen There might be a configuration / macro in your project impacting the materialization, and this model isn't created as a table. These models have to be built as tables, not views, for Elementary to work. I see in the log Simon shared the Elementary on-run-end hook exec time is 0.00s. It means it's not writing to tables. You might have some config that disables it, or really the materialization issue. The
dbt.log
might have further details.
m
Not the issue here - this took appx 5 seconds, so i guess there should be data in it?
m
Not the model build, the hook -
Model is built empty, data is loaded in hook
m
Ah i see - same here, 0 seconds. Ill see if i can deep dive the log then
@Maayan Salom Last question. Do you have any sort of hands on documentation that explicit shows how to get a detailed alert in slack including various parameters such as sample_rows. So far i can only get the default values as in the image. I already wrote about this in the support channel.