Skip to content

Instantly share code, notes, and snippets.

@dmateusp
Last active June 5, 2019 19:12
Show Gist options
  • Save dmateusp/ad9f4e942221a484dc8d96a68176bd8e to your computer and use it in GitHub Desktop.
Save dmateusp/ad9f4e942221a484dc8d96a68176bd8e to your computer and use it in GitHub Desktop.
DataFrame.transform - Spark Function Composition - Functions pre refactor usage
sumAmounts(
extractPayerBeneficiary(
"details",
dfTransactions),
col("details_beneficiary"),
date_trunc(
"day",
col("ts")
)
).filter(col("sum(amount)") > 25).show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment