Class DynamicValidator
java.lang.Object
com.illumon.iris.validation.DataQualityTestCase
com.illumon.iris.validation.dynamic.DynamicValidator
- All Implemented Interfaces:
DataQualityTestCaseInterface
,DynamicValidatorInterface
public class DynamicValidator extends DataQualityTestCase implements DynamicValidatorInterface
A user interface driven data validator.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.validation.DataQualityTestCase
DataQualityTestCase.AssertionFailed, DataQualityTestCase.MonotonicTestType
-
Field Summary
Fields inherited from class com.illumon.iris.validation.DataQualityTestCase
table, validationTableDescription
-
Constructor Summary
Constructors Constructor Description DynamicValidator(ValidationTableDescription validationTableDescription)
Create a test case for use in validation. -
Method Summary
Modifier and Type Method Description void
assertAllValuesBetween(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable minValue, Comparable maxValue)
Asserts that all values in the column are between [minValue,maxValue]void
assertAllValuesEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column)
Asserts that a column only contains a single value.void
assertAllValuesEqualInputValue(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object value)
Asserts that a column only contains a single input value.void
assertAllValuesInArrayInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)
Asserts that all values contained in arrays in a column are present in a set of expected values.void
assertAllValuesInArrayNotInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)
Asserts that all values contained in arrays in a column are not present in a set of values.void
assertAllValuesInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)
Asserts that all values in a column are present in a set of expected values.void
assertAllValuesInStringSetInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)
Asserts that all values contained in string sets in a column are present in a set of expected values.void
assertAllValuesInStringSetNotInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... values)
Asserts that all values contained in string sets in a column are not present in a set of values.void
assertAllValuesNotEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column)
Asserts that a column does not contain repeated values.void
assertAllValuesNotEqualInputValue(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object value)
Asserts that a column does not contain the specified input value.void
assertAllValuesNotInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... values)
Asserts that all values in a column are not present in a set of values.void
assertAscending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)
Asserts that sub-groups of a column have monotonically increasing values.void
assertAvg(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max, String... groupByColumns)
Asserts that the average of the column is in the inclusive range [min,max].void
assertColumnGrouped(String column)
Asserts that a column is grouped.void
assertColumnType(String column, Class type)
Asserts that a column is of the expected type.void
assertColumnTypes()
Asserts that the column types in the table match the column types in the schema.void
assertCountEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object value1, Object value2)
Asserts that a column contains the same number of rows for two given values.void
assertDescending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)
Asserts that sub-groups of a column have monotonically decreasing values.void
assertEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)
Asserts that all values incolumn1
are equal to all values incolumn2
.void
assertFracInf(boolean removeNull, boolean removeNaN, String column, double min, double max)
Asserts that the fraction of infinite values is in the inclusive range [min,max].void
assertFracNan(boolean removeNull, boolean removeInf, String column, double min, double max)
Asserts that the fraction of NaN values is in the inclusive range [min,max].void
assertFracNull(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max)
Asserts that the fraction of NULL values is in the inclusive range [min,max].void
assertFracValuesBetween(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable minValue, Comparable maxValue, double min, double max)
Asserts that the fraction of values between [minValue,maxValue] is in the inclusive range [min,max].void
assertFracWhere(String filter, double min, double max)
Asserts the fraction of a table's rows matching the provided filter falls within a defined range.void
assertFracZero(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max)
Asserts that the fraction of zero values is in the inclusive range [min,max].void
assertGreater(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)
Asserts that all values incolumn1
are greater than all values incolumn2
.void
assertGreaterEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)
Asserts that all values incolumn1
are greater than or equal to all values incolumn2
.void
assertLess(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)
Asserts that all values incolumn1
are less than all values incolumn2
.void
assertLessEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)
Asserts that all values incolumn1
are less than or equal to all values incolumn2
.void
assertMax(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable min, Comparable max, String... groupByColumns)
Asserts that the maximum value of the column is in the inclusive range [min,max].void
assertMin(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable min, Comparable max, String... groupByColumns)
Asserts that the minimum value of the column is in the inclusive range [min,max].void
assertNotEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)
Asserts that all values incolumn1
are not equal to all values incolumn2
.void
assertNotNull(String... columns)
Asserts that no null values exist in the specified columns.void
assertNumberDistinctValues(boolean removeNull, boolean removeNaN, boolean removeInf, String columns, long min, long max)
Asserts the number of distinct values is in the inclusive range [min,max].void
assertPercentile(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double percentile, double min, double max, String... groupByColumns)
Asserts that the defined percentile of the column is in the inclusive range [min,max].void
assertSize(long min, long max)
Asserts the number of rows in the table is in the inclusive range [min,max].void
assertStd(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max, String... groupByColumns)
Asserts that the standard deviation of the column is in the inclusive range [min,max].void
assertStrictlyAscending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)
Asserts that sub-groups of a column have monotonically strictly increasing values.void
assertStrictlyDescending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)
Asserts that sub-groups of a column have monotonically strictly decreasing values.Methods inherited from class com.illumon.iris.validation.DataQualityTestCase
assertAllValuesBetween, assertAllValuesEqual, assertAllValuesEqual, assertAllValuesInArrayInDistinctSet, assertAllValuesInArrayNotInDistinctSet, assertAllValuesInDistinctSet, assertAllValuesInStringSetInDistinctSet, assertAllValuesInStringSetNotInDistinctSet, assertAllValuesNotEqual, assertAllValuesNotEqual, assertAllValuesNotInDistinctSet, assertAscending, assertAvg, assertColumnGrouped, assertColumnType, assertColumnTypes, assertCountEqual, assertDescending, assertEqual, assertEquals, assertExpectedTableSize, assertFalse, assertFracInf, assertFracNan, assertFracNull, assertFracValuesBetween, assertFracWhere, assertFracZero, assertGreater, assertGreaterEqual, assertInRange, assertInRange, assertInRange, assertLess, assertLessEqual, assertMax, assertMin, assertNotEqual, assertNotEquals, assertNotNull, assertNumberDistinctValues, assertPercentile, assertSize, assertStd, assertStrictlyAscending, assertStrictlyDescending, assertTrue, clean, clean, clearMessages, fail, fail, getActualTableSize, getActualTableSize, getExpectedTableSize, getExpectedTableSize, getMessages, getPartitionColumnNames, getPartitionColumnNames, getPartitionTable, message, message, message, messageIfNotEmpty, messageIfNotEmpty, setUp, tearDown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.validation.DataQualityTestCaseInterface
clearMessages, getMessages, message, setUp, tearDown
Methods inherited from interface com.illumon.iris.validation.dynamic.DynamicValidatorInterface
assertExpectedTableSize
-
Constructor Details
-
DynamicValidator
Create a test case for use in validation.- Parameters:
validationTableDescription
- description of the table to validate.
-
-
Method Details
-
assertSize
public void assertSize(long min, long max)Description copied from interface:DynamicValidatorInterface
Asserts the number of rows in the table is in the inclusive range [min,max].- Specified by:
assertSize
in interfaceDynamicValidatorInterface
- Parameters:
min
- minimum number of table rowsmax
- maximum number of table rows
-
assertColumnType
Description copied from interface:DynamicValidatorInterface
Asserts that a column is of the expected type.- Specified by:
assertColumnType
in interfaceDynamicValidatorInterface
- Parameters:
column
- column to validatetype
- expected type
-
assertColumnGrouped
Description copied from interface:DynamicValidatorInterface
Asserts that a column is grouped.- Specified by:
assertColumnGrouped
in interfaceDynamicValidatorInterface
- Parameters:
column
- column to validate
-
assertAllValuesEqual
public void assertAllValuesEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column)Description copied from interface:DynamicValidatorInterface
Asserts that a column only contains a single value.- Specified by:
assertAllValuesEqual
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to validate
-
assertAllValuesNotEqual
public void assertAllValuesNotEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column)Description copied from interface:DynamicValidatorInterface
Asserts that a column does not contain repeated values.- Specified by:
assertAllValuesNotEqual
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to validate
-
assertAllValuesEqualInputValue
public void assertAllValuesEqualInputValue(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object value)Description copied from interface:DynamicValidatorInterface
Asserts that a column only contains a single input value.- Specified by:
assertAllValuesEqualInputValue
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to validatevalue
- make sure the column only contains this value
-
assertAllValuesNotEqualInputValue
public void assertAllValuesNotEqualInputValue(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object value)Description copied from interface:DynamicValidatorInterface
Asserts that a column does not contain the specified input value.- Specified by:
assertAllValuesNotEqualInputValue
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to validatevalue
- make sure the column does not contain this value
-
assertEqual
public void assertEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)Description copied from interface:DynamicValidatorInterface
Asserts that all values incolumn1
are equal to all values incolumn2
.- Specified by:
assertEqual
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn1
- column to testcolumn2
- column to test
-
assertNotEqual
public void assertNotEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)Description copied from interface:DynamicValidatorInterface
Asserts that all values incolumn1
are not equal to all values incolumn2
.- Specified by:
assertNotEqual
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn1
- column to testcolumn2
- column to test
-
assertLess
public void assertLess(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)Description copied from interface:DynamicValidatorInterface
Asserts that all values incolumn1
are less than all values incolumn2
.- Specified by:
assertLess
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn1
- column to testcolumn2
- column to test
-
assertLessEqual
public void assertLessEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)Description copied from interface:DynamicValidatorInterface
Asserts that all values incolumn1
are less than or equal to all values incolumn2
.- Specified by:
assertLessEqual
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn1
- column to testcolumn2
- column to test
-
assertGreater
public void assertGreater(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)Description copied from interface:DynamicValidatorInterface
Asserts that all values incolumn1
are greater than all values incolumn2
.- Specified by:
assertGreater
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn1
- column to testcolumn2
- column to test
-
assertGreaterEqual
public void assertGreaterEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column1, String column2)Description copied from interface:DynamicValidatorInterface
Asserts that all values incolumn1
are greater than or equal to all values incolumn2
.- Specified by:
assertGreaterEqual
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn1
- column to testcolumn2
- column to test
-
assertNumberDistinctValues
public void assertNumberDistinctValues(boolean removeNull, boolean removeNaN, boolean removeInf, String columns, long min, long max)Description copied from interface:DynamicValidatorInterface
Asserts the number of distinct values is in the inclusive range [min,max].- Specified by:
assertNumberDistinctValues
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumns
- comma separated list of columns to testmin
- minimum fraction of values remaining after the filter. Between 0 and 1.max
- maximum fraction of values remaining after the filter. Between 0 and 1.
-
assertAllValuesInDistinctSet
public void assertAllValuesInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)Description copied from interface:DynamicValidatorInterface
Asserts that all values in a column are present in a set of expected values.- Specified by:
assertAllValuesInDistinctSet
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testexpectedValues
- set of expected values
-
assertAllValuesInArrayInDistinctSet
public void assertAllValuesInArrayInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)Description copied from interface:DynamicValidatorInterface
Asserts that all values contained in arrays in a column are present in a set of expected values.- Specified by:
assertAllValuesInArrayInDistinctSet
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testexpectedValues
- set of expected values
-
assertAllValuesInStringSetInDistinctSet
public void assertAllValuesInStringSetInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)Description copied from interface:DynamicValidatorInterface
Asserts that all values contained in string sets in a column are present in a set of expected values.- Specified by:
assertAllValuesInStringSetInDistinctSet
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testexpectedValues
- set of expected values
-
assertAllValuesNotInDistinctSet
public void assertAllValuesNotInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... values)Description copied from interface:DynamicValidatorInterface
Asserts that all values in a column are not present in a set of values.- Specified by:
assertAllValuesNotInDistinctSet
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testvalues
- set of values
-
assertAllValuesInArrayNotInDistinctSet
public void assertAllValuesInArrayNotInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... expectedValues)Description copied from interface:DynamicValidatorInterface
Asserts that all values contained in arrays in a column are not present in a set of values.- Specified by:
assertAllValuesInArrayNotInDistinctSet
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testexpectedValues
- set of values
-
assertAllValuesInStringSetNotInDistinctSet
public void assertAllValuesInStringSetNotInDistinctSet(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object... values)Description copied from interface:DynamicValidatorInterface
Asserts that all values contained in string sets in a column are not present in a set of values.- Specified by:
assertAllValuesInStringSetNotInDistinctSet
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testvalues
- set of values
-
assertFracWhere
Description copied from interface:DynamicValidatorInterface
Asserts the fraction of a table's rows matching the provided filter falls within a defined range.- Specified by:
assertFracWhere
in interfaceDynamicValidatorInterface
- Parameters:
filter
- filtermin
- minimum fraction of values remaining after the filter. Between 0 and 1.max
- maximum fraction of values remaining after the filter. Between 0 and 1.
-
assertFracNull
public void assertFracNull(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max)Description copied from interface:DynamicValidatorInterface
Asserts that the fraction of NULL values is in the inclusive range [min,max].- Specified by:
assertFracNull
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testmin
- minimum fraction of values remaining after the filter. Between 0 and 1.max
- maximum fraction of values remaining after the filter. Between 0 and 1.
-
assertNotNull
Description copied from interface:DynamicValidatorInterface
Asserts that no null values exist in the specified columns.- Specified by:
assertNotNull
in interfaceDynamicValidatorInterface
-
assertFracNan
public void assertFracNan(boolean removeNull, boolean removeInf, String column, double min, double max)Description copied from interface:DynamicValidatorInterface
Asserts that the fraction of NaN values is in the inclusive range [min,max].- Specified by:
assertFracNan
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testmin
- minimum fraction of values remaining after the filter. Between 0 and 1.max
- maximum fraction of values remaining after the filter. Between 0 and 1.
-
assertFracInf
public void assertFracInf(boolean removeNull, boolean removeNaN, String column, double min, double max)Description copied from interface:DynamicValidatorInterface
Asserts that the fraction of infinite values is in the inclusive range [min,max].- Specified by:
assertFracInf
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNcolumn
- column to testmin
- minimum fraction of values remaining after the filter. Between 0 and 1.max
- maximum fraction of values remaining after the filter. Between 0 and 1.
-
assertFracZero
public void assertFracZero(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max)Description copied from interface:DynamicValidatorInterface
Asserts that the fraction of zero values is in the inclusive range [min,max].- Specified by:
assertFracZero
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testmin
- minimum fraction of values remaining after the filter. Between 0 and 1.max
- maximum fraction of values remaining after the filter. Between 0 and 1.
-
assertFracValuesBetween
public void assertFracValuesBetween(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable minValue, Comparable maxValue, double min, double max)Description copied from interface:DynamicValidatorInterface
Asserts that the fraction of values between [minValue,maxValue] is in the inclusive range [min,max].- Specified by:
assertFracValuesBetween
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testminValue
- minimum value for the value rangemaxValue
- maximum value for the value rangemin
- minimum fraction of values remaining after the filter. Between 0 and 1.max
- maximum fraction of values remaining after the filter. Between 0 and 1.
-
assertAllValuesBetween
public void assertAllValuesBetween(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable minValue, Comparable maxValue)Description copied from interface:DynamicValidatorInterface
Asserts that all values in the column are between [minValue,maxValue]- Specified by:
assertAllValuesBetween
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testminValue
- minimum value for the value rangemaxValue
- maximum value for the value range
-
assertMin
public void assertMin(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable min, Comparable max, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that the minimum value of the column is in the inclusive range [min,max].- Specified by:
assertMin
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testmin
- minimum value for the value rangemax
- maximum value for the value rangegroupByColumns
- columns delineating groups for testing monotonicity
-
assertMax
public void assertMax(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Comparable min, Comparable max, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that the maximum value of the column is in the inclusive range [min,max].- Specified by:
assertMax
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testmin
- minimum value for the value rangemax
- maximum value for the value rangegroupByColumns
- columns delineating groups for testing monotonicity
-
assertAvg
public void assertAvg(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that the average of the column is in the inclusive range [min,max].- Specified by:
assertAvg
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testmin
- minimum value for the value rangemax
- maximum value for the value rangegroupByColumns
- columns delineating groups for testing monotonicity
-
assertStd
public void assertStd(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double min, double max, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that the standard deviation of the column is in the inclusive range [min,max].- Specified by:
assertStd
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testmin
- minimum value for the value rangemax
- maximum value for the value rangegroupByColumns
- columns delineating groups for testing monotonicity
-
assertPercentile
public void assertPercentile(boolean removeNull, boolean removeNaN, boolean removeInf, String column, double percentile, double min, double max, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that the defined percentile of the column is in the inclusive range [min,max].- Specified by:
assertPercentile
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testpercentile
- percentile of the column to test. Between 0 and 1.min
- minimum value for the value rangemax
- maximum value for the value rangegroupByColumns
- columns delineating groups for testing monotonicity
-
assertAscending
public void assertAscending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that sub-groups of a column have monotonically increasing values. Consecutive values within a group must be equal or increasing.- Specified by:
assertAscending
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testgroupByColumns
- columns delineating groups for testing monotonicity
-
assertStrictlyAscending
public void assertStrictlyAscending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that sub-groups of a column have monotonically strictly increasing values. Consecutive values within a group must be increasing.- Specified by:
assertStrictlyAscending
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testgroupByColumns
- columns delineating groups for testing monotonicity
-
assertDescending
public void assertDescending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that sub-groups of a column have monotonically decreasing values. Consecutive values within a group must be equal or decreasing.- Specified by:
assertDescending
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testgroupByColumns
- columns delineating groups for testing monotonicity
-
assertStrictlyDescending
public void assertStrictlyDescending(boolean removeNull, boolean removeNaN, boolean removeInf, String column, String... groupByColumns)Description copied from interface:DynamicValidatorInterface
Asserts that sub-groups of a column have monotonically strictly decreasing values. Consecutive values within a group must be decreasing.- Specified by:
assertStrictlyDescending
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to testgroupByColumns
- columns delineating groups for testing monotonicity
-
assertCountEqual
public void assertCountEqual(boolean removeNull, boolean removeNaN, boolean removeInf, String column, Object value1, Object value2)Description copied from interface:DynamicValidatorInterface
Asserts that a column contains the same number of rows for two given values.- Specified by:
assertCountEqual
in interfaceDynamicValidatorInterface
- Parameters:
removeNull
- true to remove rows wherecolumn
is NULLremoveNaN
- true to remove rows wherecolumn
is NaNremoveInf
- true to remove rows wherecolumn
is Infcolumn
- column to validatevalue1
- make sure the column has the same number of value1 and value2 entriesvalue2
- make sure the column has the same number of value1 and value2 entries
-
assertColumnTypes
public void assertColumnTypes()Description copied from interface:DynamicValidatorInterface
Asserts that the column types in the table match the column types in the schema.- Specified by:
assertColumnTypes
in interfaceDynamicValidatorInterface
-