Class DataContractQualityRule
java.lang.Object
org.odpi.openmetadata.frameworks.integration.bitol.odcs.DataContractQualityRule
This class represents a data quality check defined in an Open Data Contract Standard (ODCS) data contract.
Quality checks can be attached to a schema object or to a schema property. The "type" determines which of the
other properties are relevant: text (description only), library (metric with a comparison operator), sql
(query with a comparison operator) or custom (engine and implementation). Only one of the comparison operators
(mustBe, mustNotBe, mustBeGreaterThan, ...) is expected.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare the values of the supplied object with those stored in the current object.Return the additional arguments for a library metric.Return the list of links to sources that provide more details about this element.Return the business impact of a failure, for example operational or regulatory.Return the list of custom (key/value) properties attached to this element.Return the description of the quality check.Return the data quality dimension being checked.Return the name of the engine that runs a custom check, for example soda or great-expectations.getId()Return the stable identifier of this element (alphanumeric, hyphen and underscore characters only).Return the engine specific implementation of a custom check (a string or a structure).Return the method used to perform the check, for example reconciliation.Return the metric evaluated by a library check.Return the value that the checked metric must be equal to.Return the inclusive range (two values) that the checked metric must be within.Return the value that the checked metric must be greater than or equal to.Return the value that the checked metric must be greater than.Return the value that the checked metric must be less than or equal to.Return the value that the checked metric must be less than.Return the value that the checked metric must not be equal to.Return the range (two values) that the checked metric must be outside of.getName()Return the name of the quality check.getQuery()Return the SQL query of a sql check.getRule()Return the name of the rule (deprecated in favour of metric).Return the schedule configuration for the scheduler, for example a cron expression.Return the name of the scheduler that runs the check, for example cron.Return the severity of a failure, for example info, warning or error.getTags()Return the list of tags attached to this element.getType()Return the type of quality check: text, library, sql or custom.getUnit()Return the unit of the values being compared, for example rows or percent.inthashCode()Return hash code based on properties.voidsetArguments(Map<String, Object> arguments) Set up the additional arguments for a library metric.voidsetAuthoritativeDefinitions(List<BitolAuthoritativeDefinition> authoritativeDefinitions) Set up the list of links to sources that provide more details about this element.voidsetBusinessImpact(String businessImpact) Set up the business impact of a failure, for example operational or regulatory.voidsetCustomProperties(List<BitolCustomProperty> customProperties) Set up the list of custom (key/value) properties attached to this element.voidsetDescription(String description) Set up the description of the quality check.voidsetDimension(String dimension) Set up the data quality dimension being checked.voidSet up the name of the engine that runs a custom check, for example soda or great-expectations.voidSet up the stable identifier of this element (alphanumeric, hyphen and underscore characters only).voidsetImplementation(Object implementation) Set up the engine specific implementation of a custom check (a string or a structure).voidSet up the method used to perform the check, for example reconciliation.voidSet up the metric evaluated by a library check.voidSet up the value that the checked metric must be equal to.voidsetMustBeBetween(List<Number> mustBeBetween) Set up the inclusive range (two values) that the checked metric must be within.voidsetMustBeGreaterOrEqualTo(Number mustBeGreaterOrEqualTo) Set up the value that the checked metric must be greater than or equal to.voidsetMustBeGreaterThan(Number mustBeGreaterThan) Set up the value that the checked metric must be greater than.voidsetMustBeLessOrEqualTo(Number mustBeLessOrEqualTo) Set up the value that the checked metric must be less than or equal to.voidsetMustBeLessThan(Number mustBeLessThan) Set up the value that the checked metric must be less than.voidsetMustNotBe(Object mustNotBe) Set up the value that the checked metric must not be equal to.voidsetMustNotBeBetween(List<Number> mustNotBeBetween) Set up the range (two values) that the checked metric must be outside of.voidSet up the name of the quality check.voidSet up the SQL query of a sql check.voidSet up the name of the rule (deprecated in favour of metric).voidsetSchedule(String schedule) Set up the schedule configuration for the scheduler, for example a cron expression.voidsetScheduler(String scheduler) Set up the name of the scheduler that runs the check, for example cron.voidsetSeverity(String severity) Set up the severity of a failure, for example info, warning or error.voidSet up the list of tags attached to this element.voidSet up the type of quality check: text, library, sql or custom.voidSet up the unit of the values being compared, for example rows or percent.toString()Standard toString method.
-
Constructor Details
-
DataContractQualityRule
public DataContractQualityRule()Default constructor
-
-
Method Details
-
getId
Return the stable identifier of this element (alphanumeric, hyphen and underscore characters only).- Returns:
- string identifier
-
setId
Set up the stable identifier of this element (alphanumeric, hyphen and underscore characters only).- Parameters:
id- string identifier
-
getName
Return the name of the quality check.- Returns:
- string name
-
setName
Set up the name of the quality check.- Parameters:
name- string name
-
getDescription
Return the description of the quality check.- Returns:
- string description
-
setDescription
Set up the description of the quality check.- Parameters:
description- string description
-
getType
Return the type of quality check: text, library, sql or custom. Standard values are defined in DataContractQualityType.- Returns:
- string type name
-
setType
Set up the type of quality check: text, library, sql or custom. Standard values are defined in DataContractQualityType.- Parameters:
type- string type name
-
getDimension
Return the data quality dimension being checked. Standard values are defined in DataContractQualityDimension.- Returns:
- string dimension name
-
setDimension
Set up the data quality dimension being checked. Standard values are defined in DataContractQualityDimension.- Parameters:
dimension- string dimension name
-
getMetric
Return the metric evaluated by a library check. Standard values are defined in DataContractQualityMetric.- Returns:
- string metric name
-
setMetric
Set up the metric evaluated by a library check. Standard values are defined in DataContractQualityMetric.- Parameters:
metric- string metric name
-
getRule
Return the name of the rule (deprecated in favour of metric).- Returns:
- string rule name
-
setRule
Set up the name of the rule (deprecated in favour of metric).- Parameters:
rule- string rule name
-
getSeverity
Return the severity of a failure, for example info, warning or error.- Returns:
- string severity
-
setSeverity
Set up the severity of a failure, for example info, warning or error.- Parameters:
severity- string severity
-
getBusinessImpact
Return the business impact of a failure, for example operational or regulatory.- Returns:
- string impact
-
setBusinessImpact
Set up the business impact of a failure, for example operational or regulatory.- Parameters:
businessImpact- string impact
-
getMethod
Return the method used to perform the check, for example reconciliation.- Returns:
- string method
-
setMethod
Set up the method used to perform the check, for example reconciliation.- Parameters:
method- string method
-
getSchedule
Return the schedule configuration for the scheduler, for example a cron expression.- Returns:
- string schedule
-
setSchedule
Set up the schedule configuration for the scheduler, for example a cron expression.- Parameters:
schedule- string schedule
-
getScheduler
Return the name of the scheduler that runs the check, for example cron.- Returns:
- string scheduler name
-
setScheduler
Set up the name of the scheduler that runs the check, for example cron.- Parameters:
scheduler- string scheduler name
-
getUnit
Return the unit of the values being compared, for example rows or percent.- Returns:
- string unit
-
setUnit
Set up the unit of the values being compared, for example rows or percent.- Parameters:
unit- string unit
-
getQuery
Return the SQL query of a sql check. It may use the ${object} and ${property} placeholders.- Returns:
- string SQL query
-
setQuery
Set up the SQL query of a sql check. It may use the ${object} and ${property} placeholders.- Parameters:
query- string SQL query
-
getEngine
Return the name of the engine that runs a custom check, for example soda or great-expectations.- Returns:
- string engine name
-
setEngine
Set up the name of the engine that runs a custom check, for example soda or great-expectations.- Parameters:
engine- string engine name
-
getImplementation
Return the engine specific implementation of a custom check (a string or a structure).- Returns:
- implementation string or structure
-
setImplementation
Set up the engine specific implementation of a custom check (a string or a structure).- Parameters:
implementation- implementation string or structure
-
getArguments
Return the additional arguments for a library metric.- Returns:
- map of argument names to values
-
setArguments
Set up the additional arguments for a library metric.- Parameters:
arguments- map of argument names to values
-
getMustBe
Return the value that the checked metric must be equal to.- Returns:
- expected value
-
setMustBe
Set up the value that the checked metric must be equal to.- Parameters:
mustBe- expected value
-
getMustNotBe
Return the value that the checked metric must not be equal to.- Returns:
- unexpected value
-
setMustNotBe
Set up the value that the checked metric must not be equal to.- Parameters:
mustNotBe- unexpected value
-
getMustBeGreaterThan
Return the value that the checked metric must be greater than.- Returns:
- numeric threshold
-
setMustBeGreaterThan
Set up the value that the checked metric must be greater than.- Parameters:
mustBeGreaterThan- numeric threshold
-
getMustBeGreaterOrEqualTo
Return the value that the checked metric must be greater than or equal to.- Returns:
- numeric threshold
-
setMustBeGreaterOrEqualTo
Set up the value that the checked metric must be greater than or equal to.- Parameters:
mustBeGreaterOrEqualTo- numeric threshold
-
getMustBeLessThan
Return the value that the checked metric must be less than.- Returns:
- numeric threshold
-
setMustBeLessThan
Set up the value that the checked metric must be less than.- Parameters:
mustBeLessThan- numeric threshold
-
getMustBeLessOrEqualTo
Return the value that the checked metric must be less than or equal to.- Returns:
- numeric threshold
-
setMustBeLessOrEqualTo
Set up the value that the checked metric must be less than or equal to.- Parameters:
mustBeLessOrEqualTo- numeric threshold
-
getMustBeBetween
Return the inclusive range (two values) that the checked metric must be within.- Returns:
- list of two numbers
-
setMustBeBetween
Set up the inclusive range (two values) that the checked metric must be within.- Parameters:
mustBeBetween- list of two numbers
-
getMustNotBeBetween
Return the range (two values) that the checked metric must be outside of.- Returns:
- list of two numbers
-
setMustNotBeBetween
Set up the range (two values) that the checked metric must be outside of.- Parameters:
mustNotBeBetween- list of two numbers
-
getTags
Return the list of tags attached to this element.- Returns:
- list of tag strings
-
setTags
Set up the list of tags attached to this element.- Parameters:
tags- list of tag strings
-
getCustomProperties
Return the list of custom (key/value) properties attached to this element.- Returns:
- list of custom properties
-
setCustomProperties
Set up the list of custom (key/value) properties attached to this element.- Parameters:
customProperties- list of custom properties
-
getAuthoritativeDefinitions
Return the list of links to sources that provide more details about this element.- Returns:
- list of authoritative definitions
-
setAuthoritativeDefinitions
public void setAuthoritativeDefinitions(List<BitolAuthoritativeDefinition> authoritativeDefinitions) Set up the list of links to sources that provide more details about this element.- Parameters:
authoritativeDefinitions- list of authoritative definitions
-
toString
Standard toString method. -
equals
Compare the values of the supplied object with those stored in the current object. -
hashCode
public int hashCode()Return hash code based on properties.
-