c

org.checkita.dqf.core.metrics.df.regular.BasicStringDFMetrics

StringLengthDFMetricCalculator

case class StringLengthDFMetricCalculator(metricId: String, columns: Seq[String], compareLength: Int, compareRule: String, reversed: Boolean) extends ConditionalDFCalculator with Product with Serializable

Calculates amount of strings with specific requested length.

metricId

Id of the metric.

columns

Sequence of columns which are used for metric calculation

compareLength

Requested length

compareRule

Comparison rule. Could be:

  • "eq" - equals to,
  • "lt" - less than,
  • "lte" - less than or equals to,
  • "gt" - greater than,
  • "gte" - greater than or equals to.
reversed

Boolean flag indicating whether error collection logic should be reversed for this metric

Linear Supertypes
Serializable, Serializable, Product, Equals, ConditionalDFCalculator, ReversibleDFCalculator, DFMetricCalculator, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringLengthDFMetricCalculator
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ConditionalDFCalculator
  7. ReversibleDFCalculator
  8. DFMetricCalculator
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringLengthDFMetricCalculator(metricId: String, columns: Seq[String], compareLength: Int, compareRule: String, reversed: Boolean)

    metricId

    Id of the metric.

    columns

    Sequence of columns which are used for metric calculation

    compareLength

    Requested length

    compareRule

    Comparison rule. Could be:

    • "eq" - equals to,
    • "lt" - less than,
    • "lte" - less than or equals to,
    • "gt" - greater than,
    • "gte" - greater than or equals to.
    reversed

    Boolean flag indicating whether error collection logic should be reversed for this metric

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. val columns: Seq[String]
  7. val compareLength: Int
  8. val compareRule: String
  9. val emptyValue: Column

    All conditional metrics should return zero when DF is empty.

    All conditional metrics should return zero when DF is empty.

    Attributes
    protected
    Definition Classes
    ConditionalDFCalculatorDFMetricCalculator
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def errorConditionExpr(implicit colTypes: Map[String, DataType]): Column

    For direct error collection logic metric increment is considered failed when for one or more of metric columns the condition is not met.

    For direct error collection logic metric increment is considered failed when for one or more of metric columns the condition is not met. For reversed error collection logic metric increment is considered failed when for one or more of metric columns the condition IS met.

    colTypes

    Map of column names to their datatype.

    returns

    Spark row-level expression yielding boolean result.

    Attributes
    protected
    Definition Classes
    ConditionalDFCalculatorDFMetricCalculator
  12. def errorExpr(rowData: Column)(implicit colTypes: Map[String, DataType]): Column

    Error collection expression: collects row data in case of metric error.

    Error collection expression: collects row data in case of metric error.

    rowData

    Array of row data from columns related to this metric calculator (source keyFields + metric columns + window start time column for streaming applications)

    colTypes

    Map of column names to their datatype.

    returns

    Spark expression that will yield row data in case of metric error.

    Attributes
    protected
    Definition Classes
    DFMetricCalculator
  13. def errorMessage: String

    For direct error collection logic strings values which length doesn't meet provided criteria are considered as metric failure.

    For direct error collection logic strings values which length doesn't meet provided criteria are considered as metric failure. For reversed error collection logic strings values which length DOES meet provided criteria are considered as metric failure.

    returns

    Metric increment failure message.

    Definition Classes
    StringLengthDFMetricCalculatorDFMetricCalculator
  14. def errors(implicit errorDumpSize: Int, keyFields: Seq[String], colTypes: Map[String, DataType]): Column

    Final metric errors aggregation expression.

    Final metric errors aggregation expression. Collects all metric errors into an array column. The size of array is limited by maximum allowed error dump size parameter.

    errorDumpSize

    Maximum allowed number of errors to be collected per single metric.

    keyFields

    Sequence of source/stream key fields.

    colTypes

    Map of column names to their datatype.

    returns

    Spark expression that will yield array of metric errors.

    Definition Classes
    DFMetricCalculator
  15. val errorsCol: String

    Name of the column that will store metric errors

    Name of the column that will store metric errors

    Definition Classes
    DFMetricCalculator
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def metricCondExpr(colName: String)(implicit colTypes: Map[String, DataType]): Column

    Create spark expression which checks if string length of given column meet provided criteria.

    Create spark expression which checks if string length of given column meet provided criteria.

    colName

    Column to which the metric condition is applied

    colTypes

    Map of column names to their datatype.

    Attributes
    protected
    Definition Classes
    StringLengthDFMetricCalculatorConditionalDFCalculator
  20. val metricId: String

    Unlike RDD calculators, DF calculators are not groped by its type.

    Unlike RDD calculators, DF calculators are not groped by its type. For each metric defined in DQ job, there will be created its own instance of DF calculator. Thus, DF metric calculators can be linked to metric definitions by metricId.

    Definition Classes
    StringLengthDFMetricCalculatorDFMetricCalculator
  21. val metricName: MetricName
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def result(implicit colTypes: Map[String, DataType]): Column

    Final metric aggregation expression that MUST yield double value.

    Final metric aggregation expression that MUST yield double value.

    colTypes

    Map of column names to their datatype.

    returns

    Spark expression that will yield double metric calculator result

    Definition Classes
    DFMetricCalculator
  26. val resultAggregateFunction: (Column) ⇒ Column

    Aggregation function for all conditional metrics is just a summation.

    Aggregation function for all conditional metrics is just a summation.

    Attributes
    protected
    Definition Classes
    ConditionalDFCalculatorDFMetricCalculator
  27. val resultCol: String

    Name of the column that will store metric result

    Name of the column that will store metric result

    Definition Classes
    DFMetricCalculator
  28. def resultExpr(implicit colTypes: Map[String, DataType]): Column

    Spark expression yielding numeric result for processed row.

    Spark expression yielding numeric result for processed row. For conditional metrics, the increment is 1 when condition is met, otherwise increment is 0 (metric is not incremented).

    colTypes

    Map of column names to their datatype.

    returns

    Spark row-level expression yielding numeric result.

    Attributes
    protected
    Definition Classes
    ConditionalDFCalculatorDFMetricCalculator
  29. val reversed: Boolean
    Attributes
    protected
    Definition Classes
    StringLengthDFMetricCalculatorReversibleDFCalculator
  30. def rowDataExpr(keyFields: Seq[String]): Column

    Row data collection expression: collects values of selected columns to array for row where metric error occurred.

    Row data collection expression: collects values of selected columns to array for row where metric error occurred.

    keyFields

    Sequence of source/stream key fields.

    returns

    Spark expression that will yield array of row data for column related to this metric calculator.

    Attributes
    protected
    Definition Classes
    DFMetricCalculator
  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ConditionalDFCalculator

Inherited from ReversibleDFCalculator

Inherited from DFMetricCalculator

Inherited from AnyRef

Inherited from Any

Ungrouped