dbt Mesh training - show data types macro not working

The problem I’m having

I am doing the dbt Mesh training on dbt Learn. In the section on model contracts, a macro is provided to show you the data types in a give model. I have put this macro into a new file and replaced “model” with my model name and hit compile as the instructions indicate. It doesn’t error but it also doesn’t produce a result, just a blank line.

{% macro find_datatypes(model) %}
{% set cols=adapter.get_columns_in_relation(model) %}
{%- for col in cols %}
- name: {{ col.name | lower }}
data_type: {{ col.dtype | lower }}
{%- endfor %}
{% endmacro %}

The context of why I’m trying to do this

This seems useful, and I’d like it to work.

What I’ve already tried

Checking the model name. Rereading the instructions.

Is there something I am doing wrong?