Reputation: 156
Lately, I've been learning about spark sql, and I wanna know, is there any possible way to use mllib in spark sql, like :
select mllib_methodname(some column) from tablename;
here, the "mllib_methodname" method is a mllib method. Is there some example shows how to use mllib methods in spark sql?
Thanks in advance.
Upvotes: 1
Views: 1705
Reputation: 46
The new pipeline API is based on DataFrames, which is backed by SQL. See
http://spark.apache.org/docs/latest/ml-guide.html
Or you can simply register the predict method from MLlib models as UDFs and use them in your SQL statement. See
Upvotes: 1