I have imported JSON data from Hive database. The structure looks like the attached. JSON data has been dumped to Hive without normalizing. Is it possible to parse the data?. For example, in the attached image, the mentionedlocations
column has some places mentioned and I want them to be in separate rows.
相关问题
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Correctly parse PDF paragraphs with Python
- Easiest way to get json and parse it using JQuery
相关文章
- json_encode 没有把数组转为json
- Livy Server: return a dataframe as JSON?
- Unexpected end of JSON input from an ajax call
- How do I get from a type to the TryParse method?
- How do I do a nested list (array) of schema refere
- iconv() Vs. utf8_encode()
- Convert C# Object to Json Object
- LINQ .Include() properties from sub-types in TPH i
You can use the
Json.Document
function to read the column as JSON.I'd suggest creating a custom column with this formula:
and then expanding that column to get the multiple rows you want.
Putting these together:
This takes the
PreviousStep
in the query, adds aCustom
column which converts the JSON text into a table and then expands theName
column in each of the tables in theCustom
column and renames the columnlocations
.