Skip to content

[BUG] config.get('meta') not the same in Fusion #1375

@boxysean

Description

@boxysean

Describe the bug

Consider this model:

{{ config(meta={'four': 'five'}) }}

{% set my_dict = {'one': {'two': 'three'}} %}
-- one: {{ my_dict.get('one') }}
-- three: {{ my_dict.get('one').get('two') }}

{% set model_meta = config.get('meta') %}
-- meta: {{ model_meta }}
-- five: {{ model_meta.get('four') }}

Compiling in dbt-1.11.0:

-- one: {'two': 'three'}
-- three: three

-- meta: {'four': 'five'}
-- five: five

Compiling in dbtf-2.0.0-preview.120:

error: dbt1501: Failed to render SQL unknown method: string has no method named get
(in models/tester.sql:9:10)
  --> models/tester.sql:9:10

I can confirm that when I remove the last line in the model (meta.get('four')), Fusion successfully compiles and produces:

-- one: {'two': 'three'}
-- three: three

-- meta: {'four': 'five'}

What version of dbt Fusion is this bug in? (find out by running dbt --version)

dbtf-2.0.0-preview.120

Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.

  • YES
  • NO

To Reproduce

Expected behavior

Screenshots

Operating System and CPU Type (please complete the following information):
Mac OS Apple Silicon

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions