Class

com.ebiznext.comet.job.ingest

DsvIngestionJob

Related Doc: package ingest

Permalink

class DsvIngestionJob extends IngestionJob

Main class to ingest delimiter separated values file

Linear Supertypes
IngestionJob, SparkJob, StrictLogging, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DsvIngestionJob
  2. IngestionJob
  3. SparkJob
  4. StrictLogging
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DsvIngestionJob(domain: Domain, schema: Schema, types: List[Type], path: List[Path], storageHandler: StorageHandler, schemaHandler: SchemaHandler)(implicit settings: Settings)

    Permalink

    domain

    : Input Dataset Domain

    schema

    : Input Dataset Schema

    types

    : List of globally defined types

    path

    : Input dataset path

    storageHandler

    : Storage Handler

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 cleanHeaderCol(header: String): String

    Permalink

    remove any extra quote / BOM in the header

    remove any extra quote / BOM in the header

    header

    : Header column name

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val domain: Domain

    Permalink

    : Input Dataset Domain

    : Input Dataset Domain

    Definition Classes
    DsvIngestionJobIngestionJob
  8. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getWriteMode(): WriteMode

    Permalink
    Definition Classes
    IngestionJob
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. def index(mergedDF: DataFrame): Unit

    Permalink
    Definition Classes
    IngestionJob
  15. def ingest(dataset: DataFrame): (RDD[_], RDD[_])

    Permalink

    Apply the schema to the dataset.

    Apply the schema to the dataset. This is where all the magic happen Valid records are stored in the accepted path / table and invalid records in the rejected path / table

    dataset

    : Spark Dataset

    Definition Classes
    DsvIngestionJobIngestionJob
  16. def intersectHeaders(datasetHeaders: List[String], schemaHeaders: List[String]): (List[String], List[String])

    Permalink

    datasetHeaders

    : Headers found in the dataset

    schemaHeaders

    : Headers defined in the schema

    returns

    two lists : One with thecolumns present in the schema and the dataset and onther with the headers present in the dataset only

  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def loadDataSet(): Try[DataFrame]

    Permalink

    Load dataset using spark csv reader and all metadata.

    Load dataset using spark csv reader and all metadata. Does not infer schema. columns not defined in the schema are dropped fro the dataset (require datsets with a header)

    returns

    Spark Dataset

    Definition Classes
    DsvIngestionJobIngestionJob
  19. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    StrictLogging
  20. def merge(inputDF: DataFrame, existingDF: DataFrame, merge: MergeOptions): DataFrame

    Permalink

    Merge incoming and existing dataframes using merge options

    Merge incoming and existing dataframes using merge options

    returns

    merged dataframe

    Definition Classes
    IngestionJob
  21. lazy val metadata: Metadata

    Permalink

    Merged metadata

    Merged metadata

    Definition Classes
    IngestionJob
  22. def name: String

    Permalink

    returns

    Spark Job name

    Definition Classes
    DsvIngestionJobSparkJob
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  26. val now: Timestamp

    Permalink
    Definition Classes
    IngestionJob
  27. def partitionDataset(dataset: DataFrame, partition: List[String]): DataFrame

    Permalink
    Definition Classes
    SparkJob
  28. def partitionedDatasetWriter(dataset: DataFrame, partition: List[String]): DataFrameWriter[Row]

    Permalink

    Partition a dataset using dataset columns.

    Partition a dataset using dataset columns. To partition the dataset using the igestion time, use the reserved column names :

    • comet_year
    • comet_month
    • comet_day
    • comet_hour
    • comet_minute These columsn are renamed to "year", "month", "day", "hour", "minute" in the dataset and their values is set to the current date/time.
    dataset

    : Input dataset

    partition

    : list of columns to use for partitioning.

    returns

    The Spark session used to run this job

    Definition Classes
    SparkJob
  29. val path: List[Path]

    Permalink

    : Input dataset path

    : Input dataset path

    Definition Classes
    DsvIngestionJobIngestionJob
  30. def run(): Try[SparkSession]

    Permalink

    Main entry point as required by the Spark Job interface

    Main entry point as required by the Spark Job interface

    returns

    : Spark Session used for the job

    Definition Classes
    IngestionJobSparkJob
  31. def saveAccepted(acceptedRDD: RDD[Row], orderedSparkTypes: StructType): (DataFrame, Path)

    Permalink
  32. def saveAccepted(acceptedDF: DataFrame): (DataFrame, Path)

    Permalink

    Merge new and existing dataset if required Save using overwrite / Append mode

    Merge new and existing dataset if required Save using overwrite / Append mode

    Definition Classes
    IngestionJob
  33. def saveRejected(rejectedRDD: RDD[String]): Try[Path]

    Permalink
    Definition Classes
    IngestionJob
  34. def saveRows(dataset: DataFrame, targetPath: Path, writeMode: WriteMode, area: StorageArea, merge: Boolean): (DataFrameWriter[Row], String)

    Permalink

    Save typed dataset in parquet.

    Save typed dataset in parquet. If hive support is active, also register it as a Hive Table and if analyze is active, also compute basic statistics

    dataset

    : dataset to save

    targetPath

    : absolute path

    writeMode

    : Append or overwrite

    area

    : accepted or rejected area

    Definition Classes
    IngestionJob
  35. val schema: Schema

    Permalink

    : Input Dataset Schema

    : Input Dataset Schema

    Definition Classes
    DsvIngestionJobIngestionJob
  36. val schemaHandler: SchemaHandler

    Permalink
    Definition Classes
    DsvIngestionJobIngestionJob
  37. val schemaHeaders: List[String]

    Permalink

    dataset Header names as defined by the schema

  38. lazy val session: SparkSession

    Permalink
    Definition Classes
    SparkJob
  39. implicit val settings: Settings

    Permalink
    Definition Classes
    DsvIngestionJobSparkJob
  40. lazy val sparkEnv: SparkEnv

    Permalink
    Definition Classes
    SparkJob
  41. val storageHandler: StorageHandler

    Permalink

    : Storage Handler

    : Storage Handler

    Definition Classes
    DsvIngestionJobIngestionJob
  42. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  44. val types: List[Type]

    Permalink

    : List of globally defined types

    : List of globally defined types

    Definition Classes
    DsvIngestionJobIngestionJob
  45. def validateHeader(datasetHeaders: List[String], schemaHeaders: List[String]): Boolean

    Permalink

    datasetHeaders

    : Headers found in the dataset

    schemaHeaders

    : Headers defined in the schema

    returns

    success if all headers in the schema exist in the dataset

  46. final def wait(): Unit

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

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

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

Inherited from IngestionJob

Inherited from SparkJob

Inherited from StrictLogging

Inherited from AnyRef

Inherited from Any

Ungrouped