Had the same question on stackoverflow recently http://stackoverflow.com/questions/30008127/how-to-read-a-nested-collection-in-spark
Lomig Mégard had a detailed answer of how to do this without using LATERAL VIEW. On Mon, May 11, 2015 at 8:05 AM, Ashish Kumar Singh <ashish23...@gmail.com> wrote: > Hi , > I am trying to read Nested Avro data in Spark 1.3 using DataFrames. > I need help to retrieve the Inner element data in the Structure below. > > Below is the schema when I enter df.printSchema : > > |-- THROTTLING_PERCENTAGE: double (nullable = false) > |-- IMPRESSION_TYPE: string (nullable = false) > |-- campaignArray: array (nullable = false) > | |-- element: struct (containsNull = false) > | | |-- COOKIE: string (nullable = false) > | | |-- CAMPAIGN_ID: long (nullable = false) > > > How can I access CAMPAIGN_ID field in this schema ? > > Thanks, > Ashish Kr. Singh >