Last active
June 3, 2019 10:07
-
-
Save dmateusp/f094e352a3643c998d64db07652cd051 to your computer and use it in GitHub Desktop.
DataFrame.transform - Spark Function Composition - Transactions
This file contains 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
case class Transaction(details: String, amount: Int, ts: Timestamp) | |
val dfTransactions: DataFrame = Seq( | |
Transaction("paid by A to X", 100, Timestamp.valueOf("2018-01-05 08:00:00")), | |
Transaction("paid by B to X", 10, Timestamp.valueOf("2018-01-05 11:00:00")), | |
Transaction("paid by C to Y", 15, Timestamp.valueOf("2018-01-06 12:00:00")), | |
Transaction("paid by D to Z", 50, Timestamp.valueOf("2018-01-06 15:00:00")) | |
).toDF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment