I am trying to connect to Intersystems Cache DB from databricks using spark JDBC reader API. Though I am able to connect , list columns for tables and run count on tables, I am not able to display data or process data . While displaying data for just a simple SELECT sql , I am getting below error :
java.sql.SQLException: [SQLCODE: <-25>:<Input encountered after end of query>] --> Input (IDENTIFIER) encountered after end of query
I am using JDBC driver from https://mvnrepository.com/artifact/com.intersystems/cache-jdbc
Code:
df= spark.read \
.format("jdbc") \
.option("url", "jdbc:Cache://<IP>:<Port>/<NameSpace>”) \
.option("query", “select some_column from schema.table”) \
.option("user”,<user>) \
.option("password”,<pwd>) \
.option('driver','com.intersys.jdbc.CacheDriver') \
.load()
df.columns # This works
df.count() # This works
df.show() # This throws error