How to define test for multiple columns

Hello,

Is there a way to define test for multiple columns in one line or short form

What I am looking for is something like this:

models:
  - name: model_name
    tests:
          - not_null
                 columns: col_1, col_2, ...

At the moment, I am doing this:

models:
  - name: model_name
    columns:
      - name: col_1
        tests:
          - not_null
      - name: col_2
        tests:
          - not_null
      ...

This form is perfectly fine for tests on few columns, but the YAML file get too long when there are too many columns and tables.

Cheers

7 Likes