We then need to create a Spark session as the gateway of our program:
val spark = SparkSession
.builder
.master("local[*]")
.config("spark.sql.warehouse.dir", "tmp/")
.appName("Fraud Detection")
.getOrCreate()
Additionally, we need to import implicits for spark.sql and h2o:
implicit val sqlContext = spark.sqlContext
import sqlContext.implicits._
val h2oContext = H2OContext.getOrCreate(spark)
import h2oContext._
import h2oContext.implicits._