Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신은섭(Shin Eun Seop)
/
Detecting_fraud_clicks
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
2
Merge Requests
0
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
신은섭(Shin Eun Seop)
2018-06-05 11:04:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3fe1c07e2e6e37781ea7f6ec9c37af60ee23bd0e
3fe1c07e
1 parent
d0c0ed90
fix csv to databricks module
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/java/detact/Utill.java
src/main/java/detact/Utill.java
View file @
3fe1c07
...
...
@@ -8,7 +8,7 @@ public class Utill {
public
static
Dataset
<
Row
>
loadCSVDataSet
(
String
path
,
SparkSession
spark
){
// Read SCV to DataSet
return
spark
.
read
().
format
(
"csv"
)
return
spark
.
read
().
format
(
"c
om.databricks.spark.c
sv"
)
.
option
(
"inferSchema"
,
"true"
)
.
option
(
"header"
,
"true"
)
.
load
(
path
);
...
...
@@ -17,7 +17,7 @@ public class Utill {
public
static
void
saveCSVDataSet
(
Dataset
<
Row
>
dataset
,
String
path
){
// Read SCV to DataSet
dataset
.
repartition
(
1
)
.
write
().
format
(
"csv"
)
.
write
().
format
(
"c
om.databricks.spark.c
sv"
)
.
option
(
"inferSchema"
,
"true"
)
.
option
(
"header"
,
"true"
)
.
save
(
path
);
...
...
Please
register
or
login
to post a comment