case class AverageBoundFullCheckCalculator(checkId: String, baseMetric: String, compareThreshold: Double, rule: TrendCheckRule, windowSize: String, windowOffset: Option[String]) extends AverageBoundCheckCalculator with Product with Serializable
Average bound FULL
check calculator: verifies if metric value differs from its
historical average value by less than a given threshold
- checkId
Check ID
- baseMetric
Base metric ID
- compareThreshold
Difference threshold
- rule
Rule to build time window (either record or duration)
- windowSize
Size of the window to pull historical results
- windowOffset
Offset current date/record
- Alphabetic
- By Inheritance
- AverageBoundFullCheckCalculator
- Serializable
- Serializable
- Product
- Equals
- AverageBoundCheckCalculator
- WindowParams
- CheckCalculator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
AverageBoundFullCheckCalculator(checkId: String, baseMetric: String, compareThreshold: Double, rule: TrendCheckRule, windowSize: String, windowOffset: Option[String])
- checkId
Check ID
- baseMetric
Base metric ID
- compareThreshold
Difference threshold
- rule
Rule to build time window (either record or duration)
- windowSize
Size of the window to pull historical results
- windowOffset
Offset current date/record
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
baseMetric: String
- Definition Classes
- AverageBoundFullCheckCalculator → CheckCalculator
-
val
checkId: String
- Definition Classes
- AverageBoundFullCheckCalculator → CheckCalculator
-
val
checkName: CheckName
- Definition Classes
- AverageBoundFullCheckCalculator → CheckCalculator
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
compareFuncFailureRepr: (Double, Double) ⇒ String
- Attributes
- protected
- Definition Classes
- AverageBoundFullCheckCalculator → AverageBoundCheckCalculator
-
val
compareFuncSuccessRepr: (Double, Double) ⇒ String
- Attributes
- protected
- Definition Classes
- AverageBoundFullCheckCalculator → AverageBoundCheckCalculator
-
val
compareMetric: Option[String]
- Definition Classes
- AverageBoundCheckCalculator → CheckCalculator
- val compareThreshold: Double
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
errorMsg(e: Throwable): String
Generates error message provided with caught error.
Generates error message provided with caught error.
- e
Error that has been caught
- returns
Error message
- Attributes
- protected
- Definition Classes
- CheckCalculator
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getDetailsMsg(compareMetricResult: Option[MetricCalculatorResult]): Option[String]
Gets check details message to insert into final check message.
Gets check details message to insert into final check message.
- compareMetricResult
Compare metric result
- returns
Check details message
- Attributes
- protected
- Definition Classes
- AverageBoundFullCheckCalculator → CheckCalculator
-
def
getMessage(baseMetricResult: MetricCalculatorResult, compareMetricResult: Option[MetricCalculatorResult], status: CalculatorStatus, statusString: String): String
Generates comprehensive check message
Generates comprehensive check message
- baseMetricResult
Base metric result
- compareMetricResult
Compare metric result
- status
Check evaluation status
- statusString
Check evaluation status string
- returns
Check message
- Attributes
- protected
- Definition Classes
- CheckCalculator
-
def
getOptionHead(resSeq: Option[Seq[MetricCalculatorResult]]): Option[MetricCalculatorResult]
Safely gets head out of optional sequence of metric calculator results.
Safely gets head out of optional sequence of metric calculator results.
- resSeq
Optional sequence of metric calculator results
- returns
Optional metric calculator result
- Attributes
- protected
- Definition Classes
- CheckCalculator
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
lBound: (Double) ⇒ Option[Double]
- Attributes
- protected
- Definition Classes
- AverageBoundCheckCalculator
-
val
lThreshold: Option[Double]
- Definition Classes
- AverageBoundFullCheckCalculator → AverageBoundCheckCalculator
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
notFoundErrMsg: String
- Attributes
- protected
- Definition Classes
- CheckCalculator
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
resultOnError(err: Throwable, baseMetricResults: Seq[MetricCalculatorResult], compareMetricResults: Option[Seq[MetricCalculatorResult]]): CheckCalculatorResult
Callback method that process possible runtime error that can be thrown during check evaluation.
Callback method that process possible runtime error that can be thrown during check evaluation.
- err
Error thrown during check evaluation
- baseMetricResults
Sequence of base metric result for metric ID referenced by this check
- compareMetricResults
Sequence of compare metric result for compareMetric ID referenced by this check
- returns
Check result with Error status and captured error message
- Attributes
- protected
- Definition Classes
- AverageBoundCheckCalculator → CheckCalculator
- Note
TopN metric yields multiple results
-
def
resultOnMetricNotFound: CheckCalculatorResult
Callback method that is used when metric results are not found for metric ID referenced in this check
Callback method that is used when metric results are not found for metric ID referenced in this check
- returns
Check result with Error status and 'not found' error message
- Attributes
- protected
- Definition Classes
- AverageBoundCheckCalculator → CheckCalculator
-
val
rule: TrendCheckRule
- Definition Classes
- AverageBoundFullCheckCalculator → WindowParams
-
def
run(metricResults: MetricResults)(implicit jobId: String, manager: Option[DqStorageManager], settings: AppSettings, spark: SparkSession, fs: FileSystem): CheckCalculatorResult
Safely runs check provided with all the metric calculators results.
Safely runs check provided with all the metric calculators results. There are three scenarios covered:
- Check evaluates normally and returns either Success or Failure status (depending on whether check condition was met)
- Check evaluation throws runtime error: check result with Error status and corresponding error message is returned.
- Metric results are not found for metric ID defined in the check: check cannot be run at all and check result with Error status and corresponding message is returned.
- metricResults
All computed metrics
- jobId
Current Job ID
- manager
Implicit storage manager used to load historical results
- settings
Implicit application settings
- spark
Implicit spark session object
- fs
Implicit hadoop filesystem object
- returns
Check result
- Definition Classes
- CheckCalculator
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tryToRun(baseMetricResults: Seq[MetricCalculatorResult], compareMetricResults: Option[Seq[MetricCalculatorResult]])(implicit jobId: String, manager: Option[DqStorageManager], settings: AppSettings, spark: SparkSession, fs: FileSystem): CheckCalculatorResult
Runs the check for the given metric results.
Runs the check for the given metric results.
- baseMetricResults
Sequence of base metric result for metric ID referenced by this check
- compareMetricResults
Sequence of compare metric result for compareMetric ID referenced by this check
- jobId
Current Job ID
- manager
Implicit storage manager used to load historical results
- settings
Implicit application settings
- spark
Implicit spark session object
- fs
Implicit hadoop filesystem object
- returns
Check evaluation result with either Success or Failure status
- Attributes
- protected
- Definition Classes
- AverageBoundCheckCalculator → CheckCalculator
- Note
TopN metric yields multiple results
-
val
uBound: (Double) ⇒ Option[Double]
- Attributes
- protected
- Definition Classes
- AverageBoundCheckCalculator
-
val
uThreshold: Option[Double]
- Definition Classes
- AverageBoundFullCheckCalculator → AverageBoundCheckCalculator
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
windowOffset: Option[String]
- Definition Classes
- AverageBoundFullCheckCalculator → WindowParams
-
val
windowSize: String
- Definition Classes
- AverageBoundFullCheckCalculator → WindowParams
-
def
windowString: Option[String]
- Definition Classes
- WindowParams