Home > database >  In the hive, how to parse json fields?
In the hive, how to parse json fields?

Time:03-13


There is such a field
[{' district ':' * * * * * ", "street" : "* * * *", "city" : "* * * *"}, {' district ':' * * * * * 'and' street ':' * * * * ', 'city' : '* * * *}]
Need to parse the city, and only need to last one city
SQL language - hive

I use the get_json_object, taking '$. [1] city
'
Can run, but run out as a result of the
[' * * * * * ', '* * * * *]
And I just want to finally do not agree the idea of a city, could you tell me how to write the code that?

CodePudding user response:

Bosses genuflect is begged the small white unriddling for me,

CodePudding user response:

Bosses, genuflect is begged,,
  • Related