Advertisement
Guest User

Untitled

a guest
May 11th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.54 KB | None | 0 0
  1. def marketBasketAnalysis(session: SparkSession) ={
  2.     import session.sqlContext.implicits._
  3.     val receipts = DataLoader.readCsv()(session)
  4.     //receipts.groupBy("Paragon numer").count()
  5.     receipts
  6.       .groupBy("Paragon numer")
  7.       .count()
  8.       .drop("count")
  9.    
  10.  
  11. //receipts.filter(receipts("Paragon numer") === row).select("Produkt ID").collectAsList()
  12.  
  13. //    val listOfProduct = receipts.filter(receipts("Paragon numer") === 68285).select("Produkt ID").collectAsList()
  14. //    println (listOfProduct) -> flatmap
  15.  
  16.  
  17.  
  18.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement