Using EXPLODE

You can use EXPLODE in Data Access API to define Datasets.

Defining the Dataset:

val persons2:DataFrame = framework.dataAccess
    .dataset(
        new EntityDatasetBuilder()
            .ofType("configuration/entityTypes/Person")
            .select("Id")
            .select("attributes.FirstName")
            .select("attributes.LastName")
            .select("attributes.Email")
            .explode("attributes.Email.Email", "EmailAddress")
            .asTable("persons2")
        )
.build() 

Run SQL query:

%sql select * from persons2
Table 1. Result of SQL query execution:
Id attributes Email Address
44044361628 { "FirstName": ["Mike"], "LastName":["Ross"], "Email":[ {"Email":["mike.ross@p-litt.com"]}] } mike.ross@p-litt.com
54876905371 { "FirstName":["Harvey"], "LastName":["Specter"], "Email":[ {"Email":["harvey.specter@gmail.com"]}, {"Email":["specter@p-litt.com"]}] } harvey.specter@gmail.com
54876905371 { "FirstName":["Harvey"], "LastName":["Specter"], "Email":[ {"Email":["harvey.specter@gmail.com"]}, {"Email":["specter@p-litt.com"]}] } specter@p-litt.com