You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Jaonary Rabarisoa <ja...@gmail.com> on 2014/07/15 16:12:51 UTC

Store one to many relation ship in parquet file with spark sql

Hi all,

How should I store a one to many relationship using spark sql and parquet
format. For example I the following case class

case class Person(key: String, name: String, friends: Array[String])

gives an error when I try to insert the data in a parquet file. It doesn't
like the Array[String]

Any suggestion will be helpfull,

Regards,

Jao

Re: Store one to many relation ship in parquet file with spark sql

Posted by Michael Armbrust <mi...@databricks.com>.
Make the Array a Seq.


On Tue, Jul 15, 2014 at 7:12 AM, Jaonary Rabarisoa <ja...@gmail.com>
wrote:

> Hi all,
>
> How should I store a one to many relationship using spark sql and parquet
> format. For example I the following case class
>
> case class Person(key: String, name: String, friends: Array[String])
>
> gives an error when I try to insert the data in a parquet file. It doesn't
> like the Array[String]
>
> Any suggestion will be helpfull,
>
> Regards,
>
> Jao
>
>
>