Re: Flatten JSON to multiple columns in Spark

2017-07-19 Thread Chetan Khatri
gt;>>>> >>>>>> Implicit tried - didn't worked! >>>>>> >>>>>> from_json - didnt support spark 2.0.1 any alternate solution would be >>>>>> welcome please >>>>>> >>>>>> >>&

Re: Flatten JSON to multiple columns in Spark

2017-07-19 Thread Chetan Khatri
e JOLT (bazaarvoice/jolt >>>>>>> <https://github.com/bazaarvoice/jolt>) to flatten it to a json >>>>>>> string and then to dataframe or dataset. >>>>>>> >>>>>>> bazaarvoice/jolt >>>>>>> >>>>>&

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread lucas.g...@gmail.com
t;>>>>> bazaarvoice/jolt >>>>>> >>>>>> jolt - JSON to JSON transformation library written in Java. >>>>>> <https://github.com/bazaarvoice/jolt> >>>>>> >>>>>> >>>>>> >>

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Michael Armbrust
>> >>>>> bazaarvoice/jolt >>>>> >>>>> jolt - JSON to JSON transformation library written in Java. >>>>> <https://github.com/bazaarvoice/jolt> >>>>> >>>>> >>>>> >>>>>

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Riccardo Ferrari
> >>>> >>>> On Monday, July 17, 2017, 11:18:24 PM PDT, Chetan Khatri < >>>> chetan.opensou...@gmail.com> wrote: >>>> >>>> >>>> Explode is not working in this scenario with error - string cannot be >>>>

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread lucas.g...@gmail.com
working in this scenario with error - string cannot be >>> used in explore either array or map in spark >>> On Tue, Jul 18, 2017 at 11:39 AM, 刘虓 <ipf...@gmail.com> wrote: >>> >>> Hi, >>> have you tried to use explode? >>> >>> Cheta

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Chetan Khatri
lode is not working in this scenario with error - string cannot be >> used in explore either array or map in spark >> On Tue, Jul 18, 2017 at 11:39 AM, 刘虓 <ipf...@gmail.com> wrote: >> >> Hi, >> have you tried to use explode? >> >> Chetan Khatri <che

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Georg Heiler
mail.com> 于2017年7月18日 周二下午2:06写道: > > Hello Spark Dev's, > > Can you please guide me, how to flatten JSON to multiple columns in Spark. > > *Example:* > > Sr No Title ISBN Info > 1 Calculus Theory 1234567890 > > [{"cert":[{ > "authSbmtr":"009

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Richard Xin
ou...@gmail.com> 于2017年7月18日 周二下午2:06写道: Hello Spark Dev's, Can you please guide me, how to flatten JSON to multiple columns in Spark. Example: | Sr No | Title | ISBN | Info | | 1 | Calculus Theory | 1234567890 | [{"cert":[{ "authSbmtr":"009415da-c8cd- 418d-869e-0a19601d7

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Chetan Khatri
t;于2017年7月18日 周二下午2:06写道: > >> Hello Spark Dev's, >> >> Can you please guide me, how to flatten JSON to multiple columns in Spark. >> >> *Example:* >> >> Sr No Title ISBN Info >> 1 Calculus Theory 1234567890 [{"cert":[{ >> "authSbm

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Chetan Khatri
2017 > um 08:06: > >> Hello Spark Dev's, >> >> Can you please guide me, how to flatten JSON to multiple columns in Spark. >> >> *Example:* >> >> Sr No Title ISBN Info >> 1 Calculus Theory 1234567890 [{"cert":[{ >> "authSbmtr&q

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread 刘虓
Hi, have you tried to use explode? Chetan Khatri <chetan.opensou...@gmail.com>于2017年7月18日 周二下午2:06写道: > Hello Spark Dev's, > > Can you please guide me, how to flatten JSON to multiple columns in Spark. > > *Example:* > > Sr No Title ISBN Info > 1 Calc

Re: Flatten JSON to multiple columns in Spark

2017-07-18 Thread Georg Heiler
df.select ($"Info.*") should help Chetan Khatri <chetan.opensou...@gmail.com> schrieb am Di. 18. Juli 2017 um 08:06: > Hello Spark Dev's, > > Can you please guide me, how to flatten JSON to multiple columns in Spark. > > *Example:* > > Sr No Title ISBN Info &

Flatten JSON to multiple columns in Spark

2017-07-18 Thread Chetan Khatri
Hello Spark Dev's, Can you please guide me, how to flatten JSON to multiple columns in Spark. *Example:* Sr No Title ISBN Info 1 Calculus Theory 1234567890 [{"cert":[{ "authSbmtr":"009415da-c8cd-418d-869e-0a19601d79fa", 009415da-c8cd-418d-869e-0a19601d79fa "