Spark SQL comes with a nice feature called: "JDBC to other Databases", but, it practice, it's JDBC federation feature.
"It can be used to create data frames from jdbc databases using scala/python, but it also works directly with Spark SQL Thrift server and allow us to query external JDBC tables seamless like other hive/spark tables."
This feature works with spark-submit, spark-shell, zeppelin, spark-sql client and spark sql thift server. In this post two examples: #1 using spark-sql thrift server, #2 using spark-shell.
Example #1 using Spark SQL Thrift Server
1- Run Spark SQL Thrift Server with mysql jdbc driver:
@Guilherme Braccialli but Spark thrift server listens through port 10015,
and I think if you connect through 10000, then it’s HiveServer2 thrift server.
Maybe I’m missing something, it may be helpful if we can discuss this
but Spark thrift server listens through port 10015,
and I think if you connect through 10000, then it’s HiveServer2 thrift server.
Maybe I’m missing something, it may be helpful if we can discuss this
@kishore sanchina I'm this example I started Spark thrift server on port 10010 and connected using beeline to same port. You can use default port 10015 instead.