Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -8,7 +8,7 @@ public class Utill { | ... | @@ -8,7 +8,7 @@ public class Utill { |
8 | 8 | ||
9 | public static Dataset<Row> loadCSVDataSet(String path, SparkSession spark){ | 9 | public static Dataset<Row> loadCSVDataSet(String path, SparkSession spark){ |
10 | // Read SCV to DataSet | 10 | // Read SCV to DataSet |
11 | - return spark.read().format("csv") | 11 | + return spark.read().format("com.databricks.spark.csv") |
12 | .option("inferSchema", "true") | 12 | .option("inferSchema", "true") |
13 | .option("header", "true") | 13 | .option("header", "true") |
14 | .load(path); | 14 | .load(path); |
... | @@ -17,7 +17,7 @@ public class Utill { | ... | @@ -17,7 +17,7 @@ public class Utill { |
17 | public static void saveCSVDataSet(Dataset<Row> dataset, String path){ | 17 | public static void saveCSVDataSet(Dataset<Row> dataset, String path){ |
18 | // Read SCV to DataSet | 18 | // Read SCV to DataSet |
19 | dataset.repartition(1) | 19 | dataset.repartition(1) |
20 | - .write().format("csv") | 20 | + .write().format("com.databricks.spark.csv") |
21 | .option("inferSchema", "true") | 21 | .option("inferSchema", "true") |
22 | .option("header", "true") | 22 | .option("header", "true") |
23 | .save(path); | 23 | .save(path); | ... | ... |
-
Please register or login to post a comment