Sindre Grindheim
10/25/2023, 6:30 AMv0.11.2)? (Could also be user error I'm sure).
We use the dbt_models for many purposes. We have currently 2446 models in the project. In our production environment using v0.11.1 , dbt_models contains all the models.
However, in our development and test environments that both use v0.11.2, there are only 1203 models present in dbt_models .
This causes downstream issues for us, and I cannot understand why it is so. Seems like I might have to downgrade.Ella Katz
10/25/2023, 6:28 PMSindre Grindheim
10/26/2023, 6:56 AMElla Katz
10/26/2023, 7:11 AMSindre Grindheim
10/26/2023, 7:15 AM14:06:44 Compilation Error in model dbt_models (models/edr/dbt_artifacts/dbt_models.sql)
Delta Lake does not support dropping columns from tables
14:06:44 Compilation Error in model dbt_snapshots (models/edr/dbt_artifacts/dbt_snapshots.sql)
Delta Lake does not support dropping columns from tablesElla Katz
10/26/2023, 7:38 AMdbt run -s elementary ?Sindre Grindheim
10/26/2023, 7:39 AMdbt run --select state:modified+ --full-refresh for the deploy. Since the package version was changed, all the elementary models were run as well.Ella Katz
10/26/2023, 8:50 AMdbt run -s elementary separately just in case and see if that changes anything?
2. if you have artifact upload disabled in some runs and enabled in others I wonder if this can cause the artifacts that are uploaded to somehow be partial. I'm not sure this is the case but to make sure you can run dbt run --select elementary.edr.dbt_artifacts . this is the operation that uploads the models to dbt_models .
If any of those suggestions works this still doesn't mean we understand what happened but it will resolve the issue for you and will help us investigate.
If it doesn't, it would be great if you can share your dbt.log with me, along with a name or a few names of models that are missing from your staging schemaSindre Grindheim
10/26/2023, 10:24 AMdbt run --select elementary.edr.dbt_artifacts and then dbt run --select elementary.edr.dbt_artifacts --full-refresh
. Both runs gave the same result, where dbt_models has 1203 rows.
As you can see in the attached screenshot, there are 2450 models.
Here are the flags that are set in dbt_project.yml - the target name for scheduled runs is <env>_release:
• disable_run_results: "{{ 'release' not in target.name }}"
• disable_tests_results: "{{ 'release' not in target.name }}"
• disable_dbt_artifacts_autoupload: "{{ 'release' not in target.name or not flags.FULL_REFRESH }}"
• disable_dbt_invocation_autoupload: "{{ 'release' not in target.name }}"Sindre Grindheim
10/26/2023, 12:13 PMdbt_models in the dbt.log . After formatting it, the file was 22 684 lines long. Each set of model values was 20 lines, so dividing (22684-23) by 20 then we get 1 133 models. This is exactly the same number I get when running a count query from dbt_models .
So it looks like the generated insert query is lacking more than half the models, for whatever reason.Sindre Grindheim
10/26/2023, 12:53 PMinsert_rows.sql. I reverted the file to the previous version as of Sep 27, 2023, and then dbt_models finally contained all the models.Ella Katz
10/26/2023, 1:19 PMElla Katz
10/26/2023, 1:19 PMSindre Grindheim
10/26/2023, 1:36 PMElla Katz
10/26/2023, 2:17 PMMatthias Niehoff
10/26/2023, 4:35 PMMatthias Niehoff
10/26/2023, 6:22 PMdbt_packages/elementary/macros/utils/insert_rows.sql with https://raw.githubusercontent.com/elementary-data/dbt-data-reliability/0.11.1/macros/utils/table_operations/insert_rows.sql
3. dbt run, dbt test, edr-report
)Ella Katz
10/26/2023, 6:46 PMMaayan Salom
10/30/2023, 4:25 PM0.12.1 with a fix. Thank you for reporting!Matthias Niehoff
10/31/2023, 9:20 AMSindre Grindheim
10/31/2023, 3:44 PMdbt_models issue. However, since upgrading to the altest 0.12.1 version, we're struggling with the on-run-end hook updating dbt_columns . As I've reported in #C02CTC89LAX, it hangs for over an hour and i had to manually cancel it after that (so can't say if it would ever finish). But now I've been forced to once more downgrade to 0.11.1 .Ella Katz
11/01/2023, 6:36 AMElla Katz
11/01/2023, 10:26 AMdbt run --select elementary.edr.dbt_artifacts , after which your regular dbt runs should not get stuck on this anymore
3. I'm working on creating a setting that will disable uploading the columns and we will release it soon but in the meantime you can disable all the artifact upload from your on-run-end hooks and run it manually by following the instructions here.Sindre Grindheim
11/01/2023, 11:33 AMElla Katz
11/01/2023, 12:06 PM