Re: JSON Arrays and Spark

2016-10-11 Thread sujeet jog
llable = true) > > ||||||||||-- maritalStatus: string > (nullable = true) > > ||||||||||-- numberOfDeductions: long > (nullable = true) > > | | | | | |||-- wDate: struct (nullable = true) > > |||

Re: JSON Arrays and Spark

2016-10-11 Thread Hyukjin Kwon
true) > > | | | | | | ||-- wDate: struct (nullable = true) > > |||||||||-- originalHireDate: string > (nullable = true) > > ||||||-- year: long (nullable = true) > > > > > > *From:* Luciano R

RE: JSON Arrays and Spark

2016-10-11 Thread Kappaganthu, Sivaram (ES)
Subject: Re: JSON Arrays and Spark Please take a look at http://spark.apache.org/docs/latest/sql-programming-guide.html#json-datasets Particularly the note at the required format : Note that the file that is offered as a json file is not a typical JSON file. Each line must contain a separate, self

Re: JSON Arrays and Spark

2016-10-10 Thread Hyukjin Kwon
FYI, it supports [{...}, {...} ...] Or {...} format as input. On 11 Oct 2016 3:19 a.m., "Jean Georges Perrin" wrote: > Thanks Luciano - I think this is my issue :( > > On Oct 10, 2016, at 2:08 PM, Luciano Resende wrote: > > Please take a look at > http://spark.apache.org/docs/latest/sql-pro

Re: JSON Arrays and Spark

2016-10-10 Thread Jean Georges Perrin
Thanks Luciano - I think this is my issue :( > On Oct 10, 2016, at 2:08 PM, Luciano Resende wrote: > > Please take a look at > http://spark.apache.org/docs/latest/sql-programming-guide.html#json-datasets > > > Part

Re: JSON Arrays and Spark

2016-10-10 Thread Jean Georges Perrin
Thanks! I am ok with strict rules (despite being French), but even: [{ "red": "#f00", "green": "#0f0" },{ "red": "#f01", "green": "#0f1" }] is not going through… Is there a way to see what he does not like? the JSON parser has been pretty good to me until recen

Re: JSON Arrays and Spark

2016-10-10 Thread Luciano Resende
Please take a look at http://spark.apache.org/docs/latest/sql-programming-guide.html#json-datasets Particularly the note at the required format : Note that the file that is offered as *a json file* is not a typical JSON file. Each line must contain a separate, self-contained valid JSON object. As