Object

org.zalando.spark.jsonschema

SchemaConverter

Related Doc: package jsonschema

Permalink

object SchemaConverter

Schema Converter for getting schema in json format into a spark Structure

The given schema for spark has almost no validity checks, so it will make sense to combine this with the schema-validator. For loading data with schema, data is converted to the type given in the schema. If this is not possible the whole row will be null (!). Fields can be null, no matter if the schema has nullable true or false. The converted schema doesn't check for 'enum' fields, i.e. fields which are limited to a given set. It also doesn't check for required fields or if additional properties are set to true or false. If a field is specified in the schema, than you can select it and it will be null if missing. If a field is not in the schema, it cannot be selected even if given in the dataset.

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

Type Members

  1. case class SchemaType(typeName: String, nullable: Boolean) extends Product with Serializable

    Permalink

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. val SchemaArrayContents: String

    Permalink
  5. val SchemaFieldId: String

    Permalink
  6. val SchemaFieldName: String

    Permalink
  7. val SchemaFieldType: String

    Permalink
  8. val SchemaRoot: String

    Permalink
  9. val SchemaStructContents: String

    Permalink
  10. def addJsonArrayStructure(schema: StructType, json: JsValue, contentPath: JsPath): StructType

    Permalink
  11. def addJsonField(schema: StructType, json: JsValue): StructType

    Permalink
  12. def addJsonObjectStructure(schema: StructType, json: JsValue, contentPath: JsPath): StructType

    Permalink
  13. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def convert(inputSchema: JsValue): StructType

    Permalink
  16. def convert(inputPath: String): StructType

    Permalink
  17. def convertJsonStruct(schema: StructType, json: JsValue, jsonKeys: Set[String]): StructType

    Permalink
    Annotations
    @tailrec()
  18. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def getJsonId(json: JsValue): String

    Permalink
  23. def getJsonName(json: JsValue): String

    Permalink
  24. def getJsonType(json: JsValue): SchemaType

    Permalink
  25. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  27. def loadSchemaJson(filePath: String): JsValue

    Permalink
  28. final def ne(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  33. val typeMap: Map[String, Serializable with AbstractDataType]

    Permalink
  34. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped