Object/Trait

com.alpine.plugin.core.spark.utils

SparkSchemaUtils

Related Docs: trait SparkSchemaUtils | package utils

Permalink

object SparkSchemaUtils extends SparkSchemaUtils with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, SparkSchemaUtils, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparkSchemaUtils
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. SparkSchemaUtils
  7. AnyRef
  8. 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 convertColumnTypeToSparkSQLDataType(columnType: TypeValue, keepDatesAsStrings: Boolean): (DataType, Option[String])

    Permalink

    Convert from Alpine's 'ColumnType' to the corresponding Spark Sql Typ.

    Convert from Alpine's 'ColumnType' to the corresponding Spark Sql Typ. DateTime Behavior: Converts all DateTime columns to TimeStampType. If there is a format string will add that to the metadata. If there is no format string, will use the ISO format ("yyyy-mm-dd hh:mm:ss")

    Definition Classes
    SparkSchemaUtils
  7. def convertSparkSQLDataTypeToColumnType(structField: StructField): ColumnDef

    Permalink

    Converts from a Spark SQL Structfield to an Alpine-specific ColumnDef.

    Converts from a Spark SQL Structfield to an Alpine-specific ColumnDef.

    Definition Classes
    SparkSchemaUtils
  8. def convertSparkSQLSchemaToTabularSchema(schema: StructType): TabularSchema

    Permalink

    Converts from a Spark SQL schema to the Alpine 'TabularSchema' type.

    Converts from a Spark SQL schema to the Alpine 'TabularSchema' type. The 'TabularSchema' object this method returns can be used to create any of the tabular Alpine IO types (HDFSTabular dataset, dataTable etc.)

    Date format behavior: If the column def has not metadata stored at the DATE_METADATA_KEY constant, it wll convert DateType objects to ColumnType(DateTime, "yyyy-mm-dd") and TimeStampType objects to ColumnType(DateTime, "yyyy-mm-dd hh:mm:ss") otherwise will create a column type of ColumnType(DateTime, custom_date_format) where custom_date_format is whatever date format was specified by the column metadata.

    schema

    -a Spark SQL DataFrame schema

    returns

    the equivalent Alpine schema for that dataset

    Definition Classes
    SparkSchemaUtils
  9. def convertTabularSchemaToSparkSQLSchema(tabularSchema: TabularSchema, keepDatesAsStrings: Boolean): StructType

    Permalink
    Definition Classes
    SparkSchemaUtils
  10. def convertTabularSchemaToSparkSQLSchema(tabularSchema: TabularSchema): StructType

    Permalink

    Convert the Alpine 'TabularSchema' with column names and types to the equivalent Spark SQL data frame header.

    Convert the Alpine 'TabularSchema' with column names and types to the equivalent Spark SQL data frame header.

    Date/Time behavior: The same as convertTabularSchemaToSparkSQLSchema(tabularSchema, false). Will NOT convert special date formats to String. Instead will render Alpine date formats as Spark SQL TimeStampType. The original date format will be stored as metadata in the StructFiled object for that column definition.

    tabularSchema

    An Alpine 'TabularSchemaOutline' object with fixed column definitions containing a name and Alpine specific type.

    Definition Classes
    SparkSchemaUtils
  11. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getDateMap(tabularSchema: TabularSchema): Map[String, String]

    Permalink
    Definition Classes
    SparkSchemaUtils
  16. final def isInstanceOf[T0]: Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  21. def toStructField(columnDef: ColumnDef, nullable: Boolean = true): StructField

    Permalink
    Definition Classes
    SparkSchemaUtils
  22. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. def convertColumnTypeToSparkSQLDataType(columnType: TypeValue): DataType

    Permalink
    Definition Classes
    SparkSchemaUtils
    Annotations
    @deprecated
    Deprecated

    Will not properly handle data formats. Use toStructField

  2. def convertSparkSQLDataTypeToColumnType(dataType: DataType): TypeValue

    Permalink

    Converts from a Spark SQL data type to an Alpine-specific ColumnType

    Converts from a Spark SQL data type to an Alpine-specific ColumnType

    Definition Classes
    SparkSchemaUtils
    Annotations
    @deprecated
    Deprecated

    This doesn't properly handle date formats. Use convertSparkSQLDataTypeToColumnType instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from SparkSchemaUtils

Inherited from AnyRef

Inherited from Any

Ungrouped