# Custom Tests (model, column\_name) Inputs - Sources vs Models

**URL:** <https://discourse.getdbt.com/t/custom-tests-model-column-name-inputs-sources-vs-models/20196>\
**Category:** Help\
**Created:** [September 4, 2025, 2:27am UTC](https://discourse.getdbt.com/t/custom-tests-model-column-name-inputs-sources-vs-models/20196 "2025-09-04T02:27:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![justdbting](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@justdbting](https://discourse.getdbt.com/u/justdbting)\
**Post date:** [September 4, 2025, 2:27am UTC](https://discourse.getdbt.com/t/custom-tests-model-column-name-inputs-sources-vs-models/20196/1 "2025-09-04T02:27:54Z")

</div>

What I have learned this afternoon is that if you want to build a custom test on your sources, you can use the ‘model’ input to reference the source. I think this is confusing, in my opinion. It took me quite a while to discover this.

In other words, here is my .sql for my custom test:

```auto
{% test financialfieldstst(model, column_name) %}

select *
from {{ model }}
where try_to_number(coalesce({{ column_name }}, '0')) is null

{% endtest %}

```

And then in my sources.yml, I can reference this test:

```auto
sources:
    - name: <source_name>
      description: <description>
      database: <db>
      schema: <schema>
      tables:
        - name: <tablename>
          description: <tabledesc>
          columns:
            - name: expenses_paid
              description: total expenses paid
              data_tests:
                - financialfieldstst

```

Why don’t dbt incorporate a ‘source’ input to lessen the confusion between a source and a model? So my test would look like this:

```auto
{% test financialfieldstst(source, column_name) %}

select *
from {{ source }}
where try_to_number(coalesce({{ column_name }}, '0')) is null

{% endtest %}

```
