dbt-datamocktool icon indicating copy to clipboard operation
dbt-datamocktool copied to clipboard

More info on test failure.

Open pablo-statsig opened this issue 1 year ago • 1 comments

I would love to see more information on test failures (like what the tables that were created are called). I can try to help with this if you can give me code pointers.

pablo-statsig avatar Apr 04 '23 21:04 pablo-statsig

A bit late to the party, but if you are still interested, you can check out dmt_unit_test.sql, escpecially the macro test_equality (starts on line 13). The print statements is created here (line 63):

    {#- Print output if there are any rows within the table. -#}
    {%- if test_status == 1 -%}
        {{ dbt_datamocktool.print_color('{YELLOW}The test <' ~ name ~ '> failed with the differences:') }}
        {{ dbt_datamocktool.print_color('{RED}================================================================') }}
        {% do test_report.print_table() %}
        {{ dbt_datamocktool.print_color('{RED}================================================================') }}
    {%- endif -%}

Happy to look into it, if you have already specific ideas about it?

LeopoldGabelmann avatar Oct 10 '23 08:10 LeopoldGabelmann