# 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.

- Skill: `tools-only/unit-testing-a-model-that-depends-on-ephemeral-model-s` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/unit-testing-a-model-that-depends-on-ephemeral-model-s`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/unit-testing-a-model-that-depends-on-ephemeral-model-s/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-29
- Page: https://skillmd.com/skills/tools-only/unit-testing-a-model-that-depends-on-ephemeral-model-s

---

## 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.

```yml
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}
```

