Created
February 22, 2017 15:54
-
-
Save crocker/3aab4dc71fb0a60c145f51ed5d7baca9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val today = LocalDate.now | |
val todayTransactions = spark.read | |
.option("header", "true") | |
.option("inferSchema", "true") | |
.json(s"s3n://bucket-name/${today}/transaction.json") | |
val yesterdayTransactions = spark.read | |
.option("header", "true") | |
.option("inferSchema", "true") | |
.json(s"s3n://bucket-name/${today.minusDays(1)}/transaction.json") | |
val difference = todayTransactions.except(yesterdayTransactions) | |
difference.show(25) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment