All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.datawizards.dqm.rules.field.DictionaryRule.scala Maven / Gradle / Ivy

package com.datawizards.dqm.rules.field

import org.apache.spark.sql.Row

case class DictionaryRule(values: Seq[String]) extends FieldRule with AnyTypeComparator {
  override def name: String = "DICT"

  override def validate(field: String, row: Row): Boolean = {
    val value = row.getAs[Any](field).toString
    values.contains(value)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy