我有一个名为tag.csv(UserId,MovieId,Tag)的文件,作为计算TagScore的算法的输入
1-valorderedId = sqlContext.sql(“ SELECT MovieId AS id,
标签FROM标签ORDER BY MKovieId”)
2 val eachTagCount =
orderedId.groupBy(“ id,tag”)。count()
从数据帧以表形式存储的两步输出如何实现
val finalresult = sqlContext.sql(“ SELECT movieid,
标记名,出现AS eachTagCount,计数AS
totalCount FROM result ORDER BY MovieId”)