Skip to content

[BUG] pop() doesn't accept a second argument for the default value #659

@b-per

Description

@b-per

Describe the bug

Found when testing the dbt_artifacts package.

The code

{{ print("pop: " ~ {}.pop('a','b') ) }}

is correct in dbt-core, and will print b, as expected

On the other hand, Fusion raises the error

error: dbt1501: Failed to render SQL too many arguments: remove() takes exactly one argument, but 2 were given

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

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

  • YES
  • NO

To Reproduce
add the snippet from above in any model

Expected behavior

  1. we should accept a second arg to pop() for the default value
  2. the error message is cryptic as it mentions remove() which is not used anywhere in the user project

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiscrepancydiscrepancy between the dbt Fusion Engine and dbt Corehas-reproHas a reproducible examplepackage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions