340 Ephemeral Dependency 9333220a

Unit testing a model that depends on ephemeral model(s)

tools-only Updated 7 repo stars

File contents

Unit testing a model that depends on ephemeral model(s)

If you want to unit test a model that depends on an ephemeral model, you must use format: sql for that input.

unit_tests:
  - name: my_unit_test
    model: dim_customers
    given:
      - input: ref('ephemeral_model')
        format: sql
        rows: |
          select 1 as id, 'emily' as name
    expect:
      rows:
        - {id: 1, first_name: emily}

tools-only/X-Skills/tree/main/development/testing/340-ephemeral_dependency_9333220a commit 2f2ab8a7f7

Frequently asked questions

npx skillmds@latest add tools-only/340-ephemeral-dependency-9333220a