Created
June 4, 2019 07:03
-
-
Save dmateusp/4cef1b6d28208e04a16235178189ec8e to your computer and use it in GitHub Desktop.
Revisions
-
dmateusp created this gist
Jun 4, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ // chain transform calls dfTransactions .transform(extractPayerBeneficiary("details")) .transform(sumAmounts(date_trunc("day", col("ts")), col("details_beneficiary"))) // andThen dfTransactions .transform(extractPayerBeneficiary("details") andThen sumAmounts(date_trunc("day", col("ts")), col("details_beneficiary"))) // compose dfTransactions .transform(sumAmounts(date_trunc("day", col("ts")), col("details_beneficiary")) compose extractPayerBeneficiary("details")) // Function.chain dfTransactions .transform(Function.chain(List(extractPayerBeneficiary("details"), sumAmounts(date_trunc("day", col("ts")), col("details_beneficiary")))))