Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test contract with valid_values_reference_data #2155

Open
aixulin opened this issue Aug 22, 2024 · 1 comment
Open

Test contract with valid_values_reference_data #2155

aixulin opened this issue Aug 22, 2024 · 1 comment

Comments

@aixulin
Copy link

aixulin commented Aug 22, 2024

When I use valid_values_reference_data, there are two issues.
The first issue is:
When the value in column country does not exist in column id, setting a must_be_less_than condition will also result in a failure.

dataset: dim_employee
columns:
- name: country
  checks:
  - type: invalid_percent
    must_be_less_than: 3
    valid_values_reference_data: 
      dataset: table_b
      column: id

the printf log like this

Errors:
  error |  sodacl: Invalid reference check configuration key identity 
CheCK FAILED
  Expected invalid_ count(country)< 3
  Actual invalid_count(country) was 2

The second issue is:
when all the value of column country in column id value, checked result all passed ,but the contract result logs still has err like this

Errors:
  error |  SodaCL: Invalid reference check configuration key identity 

at sodal_parse.py
check

            for configuration_key in check_configurations:
                if configuration_key not in [NAME, WARN, FAIL, ATTRIBUTES]:
                    self.logs.error(f"Invalid freshness configuration key {configuration_key}", location=self.location)

the configuration_key is identity

Will this issue be resolved in a future version?

@tools-soda
Copy link

CLOUD-8294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants