Object

com.alpine.plugin.core.spark.reporting

NullDataReportingUtils

Related Doc: package reporting

Permalink

object NullDataReportingUtils

Based on Data frames, so they should be faster Use newer language

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NullDataReportingUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def countBadData(selected: DataFrame, removeCondition: Column): (Long, Long)

    Permalink

    returns a count of rows where "expression" is false, and true.

    returns a count of rows where "expression" is false, and true.

    selected

    - dataframe to count

    removeCondition

    - remove condition, must be possible to negate. See "filterNullDataAndReportGeneral" for limitations on the remove condition.

    returns

    (goodCount, nullCount) where goodCount is the number of rows for which "removeCondition" is false and null count is the number of rows where it was true.

  7. val defaultDataRemovedMessage: String

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def filterNullDataAndReport[T <: NullDataReportingStrategy](inputDataFrame: DataFrame, sparkRuntimeUtils: SparkRuntimeUtils, nullDataReportingStrategy: T): (DataFrame, String)

    Permalink

    Given a dataFrame, the parameters and an instance of sparkRuntimeUtils, filters out all the rows containing null values.

    Given a dataFrame, the parameters and an instance of sparkRuntimeUtils, filters out all the rows containing null values. Writes those rows to a file according to the values of the 'dataToWriteParam' and the 'badDataPathParam' (provided in the HdfsParameterUtils class). The method returns the data frame which does not contain nulls as well as a string containing an HTML formatted table with the information about the what data was removed and if/where it was stored. The message is generated using the 'AddendumWriter' object in the Plugin Core module.

    Dirty Data: Spark SQL cannot process CSV files with dirty data (i.e. String values in numeric columns. We use the Drop Malformed option, so in the case of dirty data, the operator will not fail, but will silently remove those rows.

  11. def filterNullDataAndReportGeneral[T <: NullDataReportingStrategy](inputDataFrame: DataFrame, sparkRuntimeUtils: SparkRuntimeUtils, nullDataReportingStrategy: T, removeCondition: Column, dataRemovedDueTo: String): (DataFrame, String)

    Permalink

    Same as 'filterNullDataAndReport' but rather than using the .anyNull function in the dataFrame class allows the user to define a function which returns a boolean for each row is it contains data which should be removed.

    Same as 'filterNullDataAndReport' but rather than using the .anyNull function in the dataFrame class allows the user to define a function which returns a boolean for each row is it contains data which should be removed.

    Dirty Data: Spark SQL cannot process CSV files with dirty data (i.e. String values in numeric columns. We use the Drop Malformed option, so in the case of dirty data, the operator will not fail, but will silently remove those rows.

    inputDataFrame

    could be a processed version of input data or data comming directly from operator

    sparkRuntimeUtils

    for writing the null data if necessary

    nullDataReportingStrategy

    - Either DoNotCount(), DoNotWrite() or WriteAll(path) contains information about whether and where to wrtie/ count null data

    removeCondition

    - a column condition. Data will be kept if the condition is NOT true, and removed if this condition is true. For example if the condition is col("dependent").isNull then we will remove all data that is null in the "dependent column. This expression must be nullable. It will fail if you use "col("dependent").isNull.or(col("dependent").equals(0). Because the expression !("col("dependent").isNull.or(col("dependent").equals(0)) fails on null values since both if conditions will be evaluated. Use instead !("col("dependent").isNull.or(col("dependent").eqNullSafe(0))

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getNullDataToWriteMessage(badDataPath: String, dataRemovedDueTo: String): String

    Permalink

    Return the text of the message about writing null data to file.

    Return the text of the message about writing null data to file. Method does not actually filter or write.

  15. def getRemoveAllNullsExpression(inputDataFrame: DataFrame): Column

    Permalink
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def noCountMessage(dataRemovedDueTo: String = "Null Values"): String

    Permalink
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped