elementary icon indicating copy to clipboard operation
elementary copied to clipboard

Support custom test name in observability report

Open Maayan-s opened this issue 3 years ago • 1 comments

Since dbt 1.1 custom names for tests are supported. Config looks like this:

        tests:
          - name: unexpected_order_status    # custom name for test
            test_name: accepted_values      # name of the generic test to apply

However, we don't use the right field in the API to show this name in the report.

The change:

  1. Check if we collect this field in dbt_package elementary_test_restults table. If not - add it.
  2. Make API use that field as test name if it exists.

Maayan-s avatar Sep 04 '22 19:09 Maayan-s

This is the similar issue for the alerts - https://github.com/elementary-data/elementary/issues/298

Maayan-s avatar Sep 04 '22 19:09 Maayan-s

This issue is stale because it has been open for too long with no activity. If you would like the issue to remain open, please remove the stale label or leave a comment.

github-actions[bot] avatar Nov 30 '22 02:11 github-actions[bot]

This issue was closed because it has been inactive for too long while being marked as stale. If you would like the issue to reopen, please leave a comment.

github-actions[bot] avatar Dec 08 '22 02:12 github-actions[bot]

Would like to raise awareness on this issue.

Having the ability to separate out the Test name property, rather than the generic macro name, allows a higher fidelity on the Elementary UI, especially for using the same macro but on different grains, such as on a large FACT table. This dovetails nicely into the reusability of generic test cases in DBT/ELE which can target different areas of the business.

Our particular use case is essentially ensuring that Invoices have matching payments. We have a large number of invoices, and the range of values can vary from $100's to much larger amounts. Hence, we also like to group down the grain to see it via Business Unit, Date or any other dimension.

The generic Test case runs very well with an option group_by parameter, but it is masked on the Model run as the Test Name is simply the generic macro. Even expanding this, the only way to discern it is either through the Description meta data or the compiled code.

amber-owenodoherty avatar Feb 08 '23 08:02 amber-owenodoherty

Hey, I would really love to see this implemented soon. In our dbt project we use a lot of expectations for tests and many other generic tests. When we get alerts on slack and they indicate the full name it always takes us a bit to realise which test we are actually talking about, while if we could have custom names that would be immediate and would be very easy to link it to our external documentation and dashboard where we use aliases instead of tests.

martamassarotti avatar Mar 16 '23 12:03 martamassarotti

@oravi @elongl Can we try this? https://github.com/dbt-labs/dbt-core/issues/6470

Maayan-s avatar Mar 21 '23 14:03 Maayan-s