Josselin Petiot
12/12/2023, 2:16 PMedr report
I receive this error:
ERROR — Unable to get the latest invocation: Failed to run dbt command
DEBUG — Could not get warehouse info.
ERROR — Failed to parse Elementary's database and schema
Thanks for your helpErik Zaadi
12/17/2023, 12:35 PMdbt package?
Did you follow the instructions for setting the correct connection profile?Josselin Petiot
12/18/2023, 9:35 AMErik Zaadi
12/18/2023, 9:38 AMedr.log file?Josselin Petiot
12/18/2023, 10:23 AM2023-12-18 10:44:23 — INFO — Running with edr=0.13.2
2023-12-18 10:44:23 — DEBUG — Running dbt --log-format json run-operation elementary.log_macro_results --args {"macro_name": "elementary_cli.get_latest_invocation", "macro_args": {}} --project-dir /home/grapstor/.local/lib/python3.10/site-packages/elementary/monitor/dbt_project
[31;20m2023-12-18 10:44:25 — ERROR — Unable to get the latest invocation: Failed to run dbt command.[0m
2023-12-18 10:44:25 — DEBUG — Running dbt --log-format json run-operation elementary.log_macro_results --args {"macro_name": "elementary_cli.get_adapter_type_and_unique_id", "macro_args": {}} --project-dir /home/grapstor/.local/lib/python3.10/site-packages/elementary/monitor/dbt_project
2023-12-18 10:44:28 — DEBUG — Could not get warehouse info.
Traceback (most recent call last):
File "/home/grapstor/.local/lib/python3.10/site-packages/elementary/clients/dbt/dbt_runner.py", line 82, in _run_command
result = subprocess.run(
File "/usr/alwaysdata/python/3.10.7/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dbt', '--log-format', 'json', 'run-operation', 'elementary.log_macro_results', '--args', '{"macro_name": "elementary_cli.get_adapter_type_and_unique_id", "macro_args": {}}', '--project-dir', '/home/grapstor/.local/lib/python3.10/site-packages/elementary/monitor/dbt_project']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/grapstor/.local/lib/python3.10/site-packages/elementary/monitor/data_monitoring/data_monitoring.py", line 174, in _get_warehouse_info
self.internal_dbt_runner.run_operation(
File "/home/grapstor/.local/lib/python3.10/site-packages/elementary/clients/dbt/dbt_runner.py", line 154, in run_operation
success, command_output = self._run_command(
File "/home/grapstor/.local/lib/python3.10/site-packages/elementary/clients/dbt/dbt_runner.py", line 93, in _run_command
raise DbtCommandError(err, command_args, logs=logs)
elementary.exceptions.exceptions.DbtCommandError: Failed to run dbt command.
2023-12-18 10:44:28 — DEBUG — Running dbt --log-format json run-operation elementary.log_macro_results --args {"macro_name": "elementary_cli.get_elementary_database_and_schema", "macro_args": {}} --project-dir /home/grapstor/.local/lib/python3.10/site-packages/elementary/monitor/dbt_project
[31;20m2023-12-18 10:44:30 — ERROR — Failed to parse Elementary's database and schema.[0m
2023-12-18 10:44:30 — INFO — Running dbt --log-format json run-operation elementary.log_macro_results --args {"macro_name": "elementary_cli.get_test_results", "macro_args": {"days_back": 7, "invocations_per_test": 720, "disable_passed_test_metrics": false}} --project-dir /home/grapstor/.local/lib/python3.10/site-packages/elementary/monitor/dbt_project
[31;20m2023-12-18 10:44:32 — ERROR — Could not generate the report - Error: Failed to run dbt command.
Please reach out to our community for help with this issue.[0m
NoneType: NoneErik Zaadi
12/18/2023, 10:24 AMdbt run -s elementary --full-refresh works?Josselin Petiot
12/18/2023, 11:00 AMdbt run -s elementary --full-refresh
Running with dbt=1.7.3
10:59:12 target not specified in profile 'elementary', using 'default'
10:59:13 Registered adapter: snowflake=1.7.1
10:59:13 Found 0 sources, 0 exposures, 0 metrics, 430 macros, 0 groups, 0 semantic models
10:59:13 The selection criterion 'elementary' does not match any nodes
10:59:13
10:59:13 Nothing to do. Try checking your model configs and model specification argsErik Zaadi
12/18/2023, 11:21 AMJosselin Petiot
12/18/2023, 1:24 PMJosselin Petiot
12/18/2023, 1:26 PMdbt run -s elementary --full-refresh
Running with dbt=1.7.3
13:24:03 target not specified in profile 'elementary', using 'default'
13:24:04 Registered adapter: snowflake=1.7.1
13:24:04 Found 30 models, 2 operations, 0 sources, 0 exposures, 0 metrics, 1154 macros, 0 groups, 0 semantic models
13:24:04
13:24:05
13:24:05 Running 1 on-run-start hook
13:24:05 1 of 1 START hook: elementary.on-run-start.0 ................................... [RUN]
13:24:05 1 of 1 OK hook: elementary.on-run-start.0 ...................................... [OK in 0.00s]
13:24:05
13:24:05 Concurrency: 10 threads (target='default')
13:24:05
13:24:05 1 of 30 START sql incremental model prod_elementary.data_monitoring_metrics .... [RUN]
13:24:05 2 of 30 START sql incremental model prod_elementary.dbt_columns ................ [RUN]
13:24:05 3 of 30 START sql incremental model prod_elementary.dbt_exposures .............. [RUN]
13:24:05 4 of 30 START sql incremental model prod_elementary.dbt_invocations ............ [RUN]
13:24:05 5 of 30 START sql incremental model prod_elementary.dbt_metrics ................ [RUN]
13:24:05 6 of 30 START sql incremental model prod_elementary.dbt_models ................. [RUN]
13:24:05 8 of 30 START sql incremental model prod_elementary.dbt_seeds .................. [RUN]
13:24:05 7 of 30 START sql incremental model prod_elementary.dbt_run_results ............ [RUN]
13:24:05 9 of 30 START sql incremental model prod_elementary.dbt_snapshots .............. [RUN]
13:24:05 10 of 30 START sql incremental model prod_elementary.dbt_source_freshness_results [RUN]
13:24:07 1 of 30 ERROR creating sql incremental model prod_elementary.data_monitoring_metrics [ERROR in 2.32s]
13:24:07 11 of 30 START sql incremental model prod_elementary.dbt_sources ............... [RUN]
13:24:07 4 of 30 ERROR creating sql incremental model prod_elementary.dbt_invocations ... [ERROR in 2.34s]
13:24:07 12 of 30 START sql incremental model prod_elementary.dbt_tests ................. [RUN]
13:24:07 3 of 30 ERROR creating sql incremental model prod_elementary.dbt_exposures ..... [ERROR in 2.37s]
13:24:07 8 of 30 ERROR creating sql incremental model prod_elementary.dbt_seeds ......... [ERROR in 2.36s]
13:24:07 13 of 30 START sql incremental model prod_elementary.elementary_test_results ... [RUN]
13:24:07 14 of 30 START sql table model prod_elementary.metadata ........................ [RUN]
13:24:07 6 of 30 ERROR creating sql incremental model prod_elementary.dbt_models ........ [ERROR in 2.43s]
13:24:07 15 of 30 START sql incremental model prod_elementary.schema_columns_snapshot ... [RUN]
13:24:07 10 of 30 ERROR creating sql incremental model prod_elementary.dbt_source_freshness_results [ERROR in 2.53s]
13:24:08 16 of 30 SKIP relation prod_elementary.metrics_anomaly_score ................... [SKIP]
13:24:08 7 of 30 ERROR creating sql incremental model prod_elementary.dbt_run_results ... [ERROR in 2.62s]
13:24:08 2 of 30 ERROR creating sql incremental model prod_elementary.dbt_columns ....... [ERROR in 2.63s]
13:24:08 9 of 30 ERROR creating sql incremental model prod_elementary.dbt_snapshots ..... [ERROR in 2.62s]
13:24:08 5 of 30 ERROR creating sql incremental model prod_elementary.dbt_metrics ....... [ERROR in 2.63s]
13:24:08 17 of 30 SKIP relation prod_elementary.monitors_runs ........................... [SKIP]
13:24:08 18 of 30 SKIP relation prod_elementary.job_run_results ......................... [SKIP]
13:24:08 19 of 30 SKIP relation prod_elementary.anomaly_threshold_sensitivity ........... [SKIP]
13:24:08 20 of 30 SKIP relation prod_elementary.model_run_results ....................... [SKIP]
13:24:08 21 of 30 SKIP relation prod_elementary.snapshot_run_results .................... [SKIP]
13:24:08 22 of 30 SKIP relation prod_elementary.alerts_dbt_models ....................... [SKIP]
13:24:08 14 of 30 ERROR creating sql table model prod_elementary.metadata ............... [ERROR in 0.49s]
13:24:08 11 of 30 ERROR creating sql incremental model prod_elementary.dbt_sources ...... [ERROR in 1.13s]
13:24:08 23 of 30 SKIP relation prod_elementary.alerts_dbt_source_freshness ............. [SKIP]
13:24:08 24 of 30 SKIP relation prod_elementary.information_schema_columns .............. [SKIP]
13:24:08 25 of 30 SKIP relation prod_elementary.enriched_columns ........................ [SKIP]
13:24:08 13 of 30 ERROR creating sql incremental model prod_elementary.elementary_test_results [ERROR in 1.06s]
13:24:08 26 of 30 SKIP relation prod_elementary.alerts_anomaly_detection ................ [SKIP]
13:24:08 27 of 30 SKIP relation prod_elementary.alerts_dbt_tests ........................ [SKIP]
13:24:08 28 of 30 SKIP relation prod_elementary.alerts_schema_changes ................... [SKIP]
13:24:08 29 of 30 SKIP relation prod_elementary.test_result_rows ........................ [SKIP]
13:24:09 12 of 30 ERROR creating sql incremental model prod_elementary.dbt_tests ........ [ERROR in 1.21s]
13:24:09 30 of 30 SKIP relation prod_elementary.dbt_artifacts_hashes .................... [SKIP]
13:24:09 15 of 30 ERROR creating sql incremental model prod_elementary.schema_columns_snapshot [ERROR in 1.04s]
13:24:09
13:24:09 Running 1 on-run-end hook
13:24:09 1 of 1 START hook: elementary.on-run-end.0 ..................................... [RUN]
13:24:09 1 of 1 OK hook: elementary.on-run-end.0 ........................................ [OK in 0.00s]
13:24:09
13:24:09
13:24:09 Finished running 15 incremental models, 14 view models, 1 table model, 2 hooks in 0 hours 0 minutes and 4.76 seconds (4.76s).
13:24:09
13:24:09 Completed with 15 errors and 0 warnings:
13:24:09
13:24:09 Database Error in model data_monitoring_metrics (models/edr/data_monitoring/data_monitoring/data_monitoring_metrics.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DATA_MONITORING_METRICS'
compiled Code at target/run/elementary/models/edr/data_monitoring/data_monitoring/data_monitoring_metrics.sql
13:24:09
13:24:09 Database Error in model dbt_invocations (models/edr/dbt_artifacts/dbt_invocations.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_INVOCATIONS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_invocations.sql
13:24:09
13:24:09 Database Error in model dbt_exposures (models/edr/dbt_artifacts/dbt_exposures.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_EXPOSURES'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_exposures.sql
13:24:09
13:24:09 Database Error in model dbt_seeds (models/edr/dbt_artifacts/dbt_seeds.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_SEEDS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_seeds.sql
13:24:09
13:24:09 Database Error in model dbt_models (models/edr/dbt_artifacts/dbt_models.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_MODELS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_models.sql
13:24:09
13:24:09 Database Error in model dbt_source_freshness_results (models/edr/run_results/dbt_source_freshness_results.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_SOURCE_FRESHNESS_RESULTS'
compiled Code at target/run/elementary/models/edr/run_results/dbt_source_freshness_results.sql
13:24:09
13:24:09 Database Error in model dbt_run_results (models/edr/dbt_artifacts/dbt_run_results.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_RUN_RESULTS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_run_results.sql
13:24:09
13:24:09 Database Error in model dbt_columns (models/edr/dbt_artifacts/dbt_columns.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_COLUMNS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_columns.sql
13:24:09
13:24:09 Database Error in model dbt_snapshots (models/edr/dbt_artifacts/dbt_snapshots.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_SNAPSHOTS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_snapshots.sql
13:24:09
13:24:09 Database Error in model dbt_metrics (models/edr/dbt_artifacts/dbt_metrics.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_METRICS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_metrics.sql
13:24:09
13:24:09 Database Error in model metadata (models/edr/system/metadata.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'METADATA'
compiled Code at target/run/elementary/models/edr/system/metadata.sql
13:24:09
13:24:09 Database Error in model dbt_sources (models/edr/dbt_artifacts/dbt_sources.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_SOURCES'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_sources.sql
13:24:09
13:24:09 Database Error in model elementary_test_results (models/edr/run_results/elementary_test_results.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'ELEMENTARY_TEST_RESULTS'
compiled Code at target/run/elementary/models/edr/run_results/elementary_test_results.sql
13:24:09
13:24:09 Database Error in model dbt_tests (models/edr/dbt_artifacts/dbt_tests.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'DBT_TESTS'
compiled Code at target/run/elementary/models/edr/dbt_artifacts/dbt_tests.sql
13:24:09
13:24:09 Database Error in model schema_columns_snapshot (models/edr/data_monitoring/schema_changes/schema_columns_snapshot.sql)
003001 (42501): SQL access control error:
Insufficient privileges to operate on table 'SCHEMA_COLUMNS_SNAPSHOT'
compiled Code at target/run/elementary/models/edr/data_monitoring/schema_changes/schema_columns_snapshot.sql
13:24:09
13:24:09 Done. PASS=0 WARN=0 ERROR=15 SKIP=15 TOTAL=30Josselin Petiot
12/18/2023, 1:27 PMErik Zaadi
12/18/2023, 2:17 PMJosselin Petiot
12/18/2023, 2:37 PMErik Zaadi
12/18/2023, 2:37 PMDavid Lassanske
02/25/2025, 11:36 PM