Skip to content

Commit eb4d044

Browse files
joostboonclaude
andcommitted
fix: wrap source_meta_config under elementary key in mock
In real dbt, node.source_meta is the full meta dict with the elementary config nested under an "elementary" key (same structure as node.meta). The mock was setting source_meta directly to the elementary config dict, so _merge_elementary_from_meta couldn't find the "elementary" sub-key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 390652c commit eb4d044

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

integration_tests/dbt_project/macros/get_anomaly_config.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"config": {"elementary": model_config},
1515
} %}
1616
{% if source_meta_config is not none %}
17-
{% do mock_model.update({"source_meta": source_meta_config}) %}
17+
{% do mock_model.update({"source_meta": {"elementary": source_meta_config}}) %}
1818
{% endif %}
1919
{# trick elementary into thinking this is the running model #}
2020
{% do context.update(
@@ -36,7 +36,7 @@
3636
"config": {"elementary": model_config},
3737
} %}
3838
{% if source_meta_config is not none %}
39-
{% do mock_model.update({"source_meta": source_meta_config}) %}
39+
{% do mock_model.update({"source_meta": {"elementary": source_meta_config}}) %}
4040
{% endif %}
4141
{# trick elementary into thinking this is the running model #}
4242
{% do context.update(
@@ -60,7 +60,7 @@
6060
"config": {"elementary": model_config},
6161
} %}
6262
{% if source_meta_config is not none %}
63-
{% do mock_model.update({"source_meta": source_meta_config}) %}
63+
{% do mock_model.update({"source_meta": {"elementary": source_meta_config}}) %}
6464
{% endif %}
6565
{# trick elementary into thinking this is the running model #}
6666
{% do context.update(

0 commit comments

Comments
 (0)