spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corey Nolet <cjno...@gmail.com>
Subject Re: Selecting Based on Nested Values using Language Integrated Query Syntax
Date Wed, 29 Oct 2014 00:52:33 GMT
So it wouldn't be possible to have a json string like this:

{ "name":"John", "age":53, "locations": [{ "street":"Rodeo Dr",
"number":2300 }]}

And query all people who have a location with number = 2300?




On Tue, Oct 28, 2014 at 5:30 PM, Michael Armbrust <michael@databricks.com>
wrote:

> On Tue, Oct 28, 2014 at 2:19 PM, Corey Nolet <cjnolet@gmail.com> wrote:
>
>> Is it possible to select if, say, there was an addresses field that had a
>> json array?
>>
> You can get the Nth item by "address".getItem(0).  If you want to walk
> through the whole array look at LATERAL VIEW EXPLODE in HiveQL
>
>

Mime
View raw message