Skip to content

[UDFs] Functions can be _mocked_ while unit testing a model #12025

@QMalcolm

Description

@QMalcolm

Housekeeping

  • I am a maintainer of dbt-core

Short description

Instead of actually calling the function, it should be possible to specify the value the function should return for the model being unit tested

Acceptance criteria

It's possible to specify the value the function should return for the model being unit tested

Suggested Tests

Unit test a model using a mocked function

Impact to Other Teams

N/A

Will backports be required?

No

Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2UDFsWork related to UDFsuser docs[docs.getdbt.com] Needs better documentation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions