spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Khatri <chetan.opensou...@gmail.com>
Subject Flatten JSON to multiple columns in Spark
Date Tue, 18 Jul 2017 05:53:55 GMT
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
"certUUID":"03ea5a1a-5530-4fa3-8871-9d1ebac627c4",
"effDt":"2016-05-06T15:04:56.279Z",
"fileFmt":"rjrCsv","status":"live"}],

"expdCnt":"15",
"mfgAcctNum":"531093",
"oUUID":"23d07397-4fbe-4897-8a18-b79c9f64726c",
"pgmRole":["RETAILER"],
"pgmUUID":"1cb5dd63-817a-45bc-a15c-5660e4accd63",
"regUUID":"cc1bd898-657d-40dc-af5d-4bf1569a1cc4",
"rtlrsSbmtd":["009415da-c8cd-418d-869e-0a19601d79fa"]}]

I want to get single row with 11 columns.

Thanks.

Mime
View raw message