Skip to content

Commit

Permalink
Merge pull request #65 from wri/develop
Browse files Browse the repository at this point in the history
AnnualUpdate - filter out no change rows when exporting change table
  • Loading branch information
jterry64 authored Mar 27, 2020
2 parents 2027a0b + b77be15 commit dcdb289
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ object AnnualUpdateMinimalExport extends SummaryExport {
.csv(path = outputUrl + "/wdpa/summary")
}
exportDF
.filter($"treecover_loss__year".isNotNull && $"treecover_loss__ha" > 0)
.transform(AnnualUpdateMinimalDF.aggChange(idCols, wdpa = true))
.coalesce(50) // this should result in an avg file size of 100MB
.write
Expand Down Expand Up @@ -272,14 +273,15 @@ object AnnualUpdateMinimalExport extends SummaryExport {

exportDF
.transform(AnnualUpdateMinimalDF.aggSummary(idCols))
.coalesce(4) // this should result in an avg file size of 100MB
.coalesce(33) // this should result in an avg file size of 100MB
.write
.options(csvOptions)
.csv(path = outputUrl + "/geostore/summary")
}
exportDF
.filter($"treecover_loss__year".isNotNull && $"treecover_loss__ha" > 0)
.transform(AnnualUpdateMinimalDF.aggChange(idCols))
.coalesce(10) // this should result in an avg file size of 100MB
.coalesce(50) // this should result in an avg file size of 100MB
.write
.options(csvOptions)
.csv(path = outputUrl + "/geostore/change")
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "1.0.2"
version in ThisBuild := "1.0.3"

0 comments on commit dcdb289

Please sign in to comment.