How can I call a stored procedure in Spark Sql?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2016 08:44 AM
I have seen the following code:
val url =
"jdbc:mysql://yourIP:yourPort/test?
user=yourUsername; password=yourPassword"
val df = sqlContext
.read
.format("jdbc")
.option("url", url)
.option("dbtable", "people")
.load()
But I need to run a stored procedure. When I use
exec command for the dbtable option above, it gives me this error:
com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'exec'.
Labels:
- Labels:
-
Spark sql