soda-sql
soda-sql copied to clipboard
When creating custom sql_metrics of type failed_rows I cannot set the name of the test
Describe the bug When creating custom sql_metrics of type failed_rows I cannot set the name of the test. Instead it will generate something ugly
To Reproduce Use for example the following metric
sql_metrics:
- type: failed_rows
name: STOCK_KEY_DUPLICATES
title: How many duplicate stock keys
sql: |
SELECT stock_key, Count(*) as COUNT
FROM cluster_viewer_soda
GROUP BY stock_key
HAVING Count(*) > 1
ORDER BY stock_key
I would expect this leads to the name "How many duplicate stock keys". Instead I get the name: sqlmetric(0) STOCK_KEY_DUPLICATES(STOCK_KEY_DUPLICATES == 0)
Context soda-sql-snowflake==2.1.6