Hi!
I am trying to load data from my sql database using following code
val query="select * from "+table+" "
val url = "jdbc:mysql://" + dataBaseHost + ":" + dataBasePort + "/" +
dataBaseName + "?user=" + db_user + "&password=" + db_pass
val sc = new SparkContext(new
SparkConf().setAppNam
Try including alias in the query.
val query="(select * from "+table+") a"
On Mon, Jul 6, 2015 at 3:38 AM Hafiz Mujadid
wrote:
> Hi!
> I am trying to load data from my sql database using following code
>
> val query="select * from "+table+" "
> val url = "jdbc:mysql://" + dataBaseHost + "