Version: v2.3
ParseJSONCol
Parses JSON content in a given Col
Type
transform
Fields
Name | Title | Description |
---|---|---|
jsonColName | JSON Col Name | Column containing the JSON Content |
inputCol | Input Col | Input Columns |
jsonFieldNames | JSON Field names | JSON Field names |
jsonFieldTypes | JSON Field Type | Data Type of the JSON field |
Examples
Input
txt |
---|
StringType |
{"name":"Michael"} |
{"name":"Andy","age":30} |
{"name":"Justin","age":19} |
Parameters
Name | Value |
---|---|
JSON Col Name | txt |
Input Col | JSON Field names | JSON Field Type |
---|---|---|
txt | name | StringType |
txt | age | IntegerType |
Output
txt | txt_parsed | name | age |
---|---|---|---|
StringType | StructType(StructField(name,StringType,true) | StringType | IntegerType |
{"name":"Michael"} | [Michael,null] | Michael | |
{"name":"Andy","age":30} | [Andy,30] | Andy | 30 |
{"name":"Justin","age":19} | [Justin,19] | Justin | 19 |