elementary icon indicating copy to clipboard operation
elementary copied to clipboard

Dbt compile failed after installing elementary-data

Open HantonMing opened this issue 1 year ago • 3 comments

Describe the bug For business purpose, we need to run dbt compile. But after we started to use elementary, 'dbt compile' is giving this error:

`Runtime Error
  Compilation Error in operation elementary-on-run-end-0 (.\dbt_project.yml)
    'None' has no attribute 'values'
> in macro clean_elementary_temp_tables (macros\edr\system\system_utils\clean_elementary_temp_tables.sql)
> called by macro on_run_end (macros\edr\system\hooks\on_run_end.sql)
> called by operation elementary-on-run-end-0 (.\dbt_project.yml)`

I traced it and in macro clean_elementary_test_tables, I found out that a dictionary temp_test_table_relations_map is not getting updated anywhere. Then an error is cast.

To Reproduce Steps to reproduce the behavior:

  1. Install elementary by following all instructions
  2. Activate dbt-env
  3. run "dbt compile

Expected behavior Dbt compile is expected to run without error

Screenshots image

Environment (please complete the following information):

  • edr Version: [0.14.0]
  • dbt core version: [1.7.8]
  • dbt databricks version: [1.7.7]

Additional context Could you also explain the purpose of clean_elementary_test_tables? Is it possible to set elementary/macros/edr/system/system_utils/get_config_vars.sql/" 'clean_elementary_temp_tables': true," to false by default?

HantonMing avatar Feb 22 '24 18:02 HantonMing

I am getting the same thing, upgraded from 0.13.2 to 0.14.0 and this error is now coming up.

dbt-core: 1.7.8 dot-redshift: 1.7.3

MWS-TAI avatar Feb 27 '24 03:02 MWS-TAI

I am getting the same thing, upgraded from 0.13.2 to 0.14.0 and this error is now coming up.

Have you run dbt run --select elementary in production since upgrading?

https://docs.elementary-data.com/release-notes/upgrading-elementary#upgrade-elementary-dbt-package

will-warner avatar Feb 27 '24 15:02 will-warner

@will-warner I had not tried that and yes it did resolve my issue. Not sure if this issue is due to upgrading but likely would be the same issue, maybe could be closed. Thanks!

MWS-TAI avatar Mar 11 '24 21:03 MWS-TAI

Closing since I believe this PR fixed this issue. Please re-open if relevant!

haritamar avatar May 13 '24 10:05 haritamar