This article applies to Sparkling Water for h2o versions and later.

After setting up Sparkling Water for your environment follow these steps:

1. Start sparkling-shell from the Sparkling Water folder:


2. Import the parquet file:

import org.apache.spark.sql.SparkSession

val sqlContext = SparkSession.builder().getOrCreate().sqlContext
val parquetFile ="/path/to/file/")

   To preview the imported file:

3. Flatten the parquet file:

import org.apache.spark.h2o.utils.H2OSchemaUtils

val flattenDF = H2OSchemaUtils.flattenDataFrame(parquetFile)

   To preview the flattened data frame:

4. Save the flattened file to disk: