Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

When creating custom sql_metrics of type failed_rows I cannot set the name of the test #340

Open
TimoKoole opened this issue Apr 4, 2022 · 0 comments
Labels
bug Something isn't working soda-sql

Comments

@TimoKoole
Copy link

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

@TimoKoole TimoKoole added bug Something isn't working soda-sql labels Apr 4, 2022
@vijaykiran vijaykiran self-assigned this Apr 4, 2022
@TimoKoole TimoKoole changed the title When creating custom sql_metrics of type failed_rows I cannot set the name of the tes When creating custom sql_metrics of type failed_rows I cannot set the name of the test Apr 5, 2022
@vijaykiran vijaykiran removed their assignment Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working soda-sql
Projects
None yet
Development

No branches or pull requests

2 participants