object SchemaConverter
The SchemaConverter
object provides utility methods for converting JSON schemas into Spark SQL StructType.
- Alphabetic
- By Inheritance
- SchemaConverter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val SchemaArrayContents: String
- val SchemaFieldId: String
- val SchemaFieldName: String
- val SchemaFieldType: String
- val SchemaRoot: String
- val SchemaStructContents: String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
convert(inputSchema: JsValue): StructType
Convert a JsValue representation of a JSON schema into a Spark SQL StructType.
Convert a JsValue representation of a JSON schema into a Spark SQL StructType.
- inputSchema
The JsValue representing the JSON schema.
- returns
The Spark SQL StructType representing the JSON schema.
-
def
convert(fileContent: String): StructType
Convert a JSON schema string into a Spark SQL StructType.
Convert a JSON schema string into a Spark SQL StructType.
- fileContent
The JSON schema string to be converted.
- returns
The Spark SQL StructType representing the JSON schema.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getJsonId(json: JsValue): String
Extract the id property from a JsValue representing a JSON schema.
Extract the id property from a JsValue representing a JSON schema.
- json
The JsValue representing the JSON schema.
- returns
The id property of the JSON schema as a String.
-
def
getJsonName(json: JsValue): String
Extract the name property from a JsValue representing a JSON schema.
Extract the name property from a JsValue representing a JSON schema.
- json
The JsValue representing the JSON schema.
- returns
The name property of the JSON schema as a String.
-
def
getJsonType(json: JsValue): SchemaType
Extract the type property from a JsValue representing a JSON schema.
Extract the type property from a JsValue representing a JSON schema.
- json
The JsValue representing the JSON schema.
- returns
A SchemaType object representing the type property of the JSON schema.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
loadSchemaJson(fileContent: String): JsValue
Load a JSON schema string into a JsValue representation.
Load a JSON schema string into a JsValue representation.
- fileContent
The JSON schema string to be loaded.
- returns
The JsValue representation of the JSON schema.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val typeMap: Map[String, Serializable with AbstractDataType]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()