dataset spark example read from csv scala Example: read csv in spark df = spark. read . format("csv") . option("header", "true")