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 00:36:48 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
930c2e8052e97dd7702bcaa118ca4f5576d57994
930c2e80
1 parent
bee0e9c5
add save csv
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
src/main/java/Aggregation.java
src/main/java/Aggregation.java
View file @
930c2e8
...
...
@@ -30,6 +30,8 @@ public class Aggregation {
//test
dataset
.
where
(
"ip == '5348' and app == '19'"
).
show
(
10
);
agg
.
saveCSVDataSet
(
dataset
,
"./agg_data"
);
}
...
...
@@ -84,4 +86,13 @@ public class Aggregation {
(
count
(
"utc_click_time"
).
over
(
w
)).
minus
(
1
));
//TODO 본인것 포함할 것인지 정해야함.
return
newDF
;
}
private
void
saveCSVDataSet
(
Dataset
<
Row
>
dataset
,
String
path
){
// Read SCV to DataSet
dataset
.
repartition
(
1
)
.
write
().
format
(
"csv"
)
.
option
(
"inferSchema"
,
"true"
)
.
option
(
"header"
,
"true"
)
.
save
(
path
);
}
}
...
...
Please
register
or
login
to post a comment