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

Naming of a custom SQL metrics does seem inconsistent when updating Soda Cloud #346

Open
albinkjellin opened this issue Apr 27, 2022 · 1 comment
Labels
bug Something isn't working soda-sql

Comments

@albinkjellin
Copy link

Describe the bug
When trying to name a Custom SQL metric its very convoluted. There is only one example in the docs for failed_rows and from time to time this does not seem to work either. This might only be missing documentation. Its also unclear what type should be used in order to get this to work. Probably type should not be mandatory to change the name?

To Reproduce
Steps to reproduce the behavior:

  1. Create a new test in scan.yml
  2. Run soda scan ...
    3 ...

Context
Include your scan.yml or warehouse.yml when relevant

OS:
Python Version:
Soda SQL Version: 2.1.9
Warehouse Type: SQL Server

@albinkjellin albinkjellin added bug Something isn't working soda-sql labels Apr 27, 2022
@albinkjellin
Copy link
Author

For example this does not update the name of the monitor in Soda Cloud:
sql_metrics:

  • type: failed_rows
    name: Vaid_first_name
    label: Vaid_first_name
    sql: |
    SELECT
    cast(COUNT(CASE WHEN first_name like '%[A-Za-zÀ-ÿĀ-ſ]%' AND first_name not like '%[^-A-Za-zÀ-ÿĀ-ſ''‘’]%' THEN 1 END) as decimal)/count(*) as FirstName_good_data
    from INDIVIDUAL
    tests:
    • FirstName_good_data < 85

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

1 participant