The World’s Largest Online Community for Developers

'; group by - How to sum up multiple rows (list of rows) for a given column within scala without converting to dataframe - LavOzs.Com

I have a situation where i have list of rows with multiple columns and have to group by with a lookup key which is a unique column in all rows .. I have to sum up values of a given column (say x) for all the rows from the lookup key (say lookup_1) in scala only using group by aggregate or any other method available .. I can't convert to dataframe and use aggregate ..

I am sorry if I can't put code because policy doesn't allow so ..

Your quick help would be appreciated or guidance !!!

How to convert Row of a Scala DataFrame into case class most efficiently?
Pandas Dataframe Groupby multiple columns then sum
How to define a custom aggregation function to sum a column of Vectors?
In spark and scala, how to convert or map a dataframe to specific columns info?
Spark/Scala repeated calls to withColumn() using the same function on multiple columns
Aggregate (Sum) over Window for a list of Columns
Sum the column of a data frame in Spark 2.2.0 and Scala
How to pivot a dataframe
PySpark - Convert column of Lists to Rows
Is there a way to convert Scala-Spark DataFrame to HTML table, or converting DataFrame to Scala map then convert to Json and then HTML?