Re: Is "Array Of Struct" supported in json RDDs? is it possible to query this?

2014-10-13 Thread Yin Huai
If you are using HiveContext, it should work in 1.1.

Thanks,

Yin

On Mon, Oct 13, 2014 at 5:08 AM, shahab  wrote:

> Hello,
>
> Given the following structure, is it possible to query, e.g. session[0].id
> ?
>
> In general, is it possible to query  "Array Of Struct" in json RDDs?
>
> root
>
>  |-- createdAt: long (nullable = true)
>
>  |-- id: string (nullable = true)
>
>  |-- sessions: array (nullable = true)
>
>  ||-- element: struct (containsNull = false)
>
>  |||-- id: string (nullable = true)
>
>  ||   |-- data string (nullable = true)
>
>
> best,
> /Shahab
>


Is "Array Of Struct" supported in json RDDs? is it possible to query this?

2014-10-13 Thread shahab
Hello,

Given the following structure, is it possible to query, e.g. session[0].id ?

In general, is it possible to query  "Array Of Struct" in json RDDs?

root

 |-- createdAt: long (nullable = true)

 |-- id: string (nullable = true)

 |-- sessions: array (nullable = true)

 ||-- element: struct (containsNull = false)

 |||-- id: string (nullable = true)

 ||   |-- data string (nullable = true)


best,
/Shahab