Object

za.co.absa.commons.spark

SchemaUtils

Related Doc: package spark

Permalink

object SchemaUtils

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SchemaUtils
  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. def alignSchema(df: DataFrame, selector: List[Column]): DataFrame

    Permalink

    Using schema selector returned from getDataFrameSelector aligns the schema of a DataFrame to the selector for operations where schema order might be important (e.g.

    Using schema selector returned from getDataFrameSelector aligns the schema of a DataFrame to the selector for operations where schema order might be important (e.g. hashing the whole rows and using except)

    df

    DataFrame to have it's schema aligned/sorted

    selector

    model structType for the alignment of df

    returns

    Returns aligned and filtered schema

  5. def alignSchema(df: DataFrame, structType: StructType): DataFrame

    Permalink

    Using schema selector from getDataFrameSelector aligns the schema of a DataFrame to the selector for operations where schema order might be important (e.g.

    Using schema selector from getDataFrameSelector aligns the schema of a DataFrame to the selector for operations where schema order might be important (e.g. hashing the whole rows and using except)

    df

    DataFrame to have it's schema aligned/sorted

    structType

    model structType for the alignment of df

    returns

    Returns aligned and filtered schema

  6. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  8. def diffSchema(schema1: StructType, schema2: StructType, parent: String = ""): Seq[String]

    Permalink

    Returns a list of differences in one schema to the other

    Returns a list of differences in one schema to the other

    schema1

    The first schema to compare

    schema2

    The second schema to compare

    parent

    Parent path. Should be left default by the users first run. This is used for the accumulation of differences and their print out.

    returns

    Returns a Seq of paths to differences in schemas

  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def equivalentSchemas(schema1: StructType, schema2: StructType): Boolean

    Permalink

    Compares 2 dataframe schemas.

    Compares 2 dataframe schemas.

    schema1

    The first schema to compare

    schema2

    The second schema to compare

    returns

    true if provided schemas are the same ignoring nullability

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  13. def getDataFrameSelector(schema: StructType): List[Column]

    Permalink

    Returns data selector that can be used to align schema of a data frame.

    Returns data selector that can be used to align schema of a data frame. You can use alignSchema.

    schema

    Schema that serves as the model of column order

    returns

    Sorted DF to conform to schema

  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def isSubset(subsetSchema: StructType, originalSchema: StructType): Boolean

    Permalink

    Checks if the originalSchema is a subset of subsetSchema.

    Checks if the originalSchema is a subset of subsetSchema.

    subsetSchema

    The schema that needs to be extracted

    originalSchema

    The schema that needs to have at least all t

    returns

    true if provided schemas are the same ignoring nullability

  17. final def ne(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit

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

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

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

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped