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

Machine testing of freshness (serviceLevels) #261

Closed
john-bunge-ed opened this issue Jun 13, 2024 · 5 comments
Closed

Machine testing of freshness (serviceLevels) #261

john-bunge-ed opened this issue Jun 13, 2024 · 5 comments

Comments

@john-bunge-ed
Copy link

john-bunge-ed commented Jun 13, 2024

Question:

Is the freshness parameter in the serviceLevels object supposed to be machine testable?

I applied test() to my datacontract object (see below), however no automated test results on freshness could be retrieved from the .checks or .logs elements.

datacontract_obj = DataContract(
    data_contract_file='datacontract.yaml',
    spark=spark)
datacontract_run = datacontract_obj.test()

datacontract_run.checks

datacontract_run.logs

freshness was specified in the datacontract.yaml as follows. Column timestamp_col is of timestamp format.

servicelevels:
  freshness:
    description: The maximum age of the youngest entry is 1 hour
    threshold: 1h
    timestampField: table_name.timestamp_col
@jochenchrist
Copy link
Contributor

Hi @john-bunge-ed,
this is currently not yet implemented, but would totally make sense.
Current workaround would be to add the freshness-test as additional quality test.

@john-bunge-ed
Copy link
Author

@jochenchrist
Where in the codebase would you suggest to add such an additional quality test?

@jochenchrist
Copy link
Contributor

@john-bunge-ed
Copy link
Author

thanks @jochenchrist

@jochenchrist
Copy link
Contributor

closed as duplicate to #407

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