-
-
Save yaravind/fe9ee5b03ac32d825dcbb836dda0b9fa to your computer and use it in GitHub Desktop.
Find duplicates in a Spark DataFrame
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 transactions = spark.read | |
.option("header", "true") | |
.option("inferSchema", "true") | |
.json("s3n://bucket-name/transaction.json") | |
transactions.groupBy("id", "organization").count.sort($"count".desc).show |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment