Question
· Aug 4, 2023

Azure Databricks JDBC connection to Intersystems

We encountered difficulties while attempting to establish a JDBC connection to Intersystems using AZURE Databricks, resulting in an inability to retrieve data. The JDBC version utilized was intersystems-jdbc-3.3.1.jar. If anyone has successfully employed Databricks for establishing a connection, we would appreciate information regarding the libraries you used

 

Error Message:
org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0 (TID 3) (10.140.70.71 executor driver): java.sql.SQLException: [SQLCODE: <-25>:<Input encountered after end of query>]

Product version: IRIS 2022.3
Discussion (3)1
Log in or sign up to continue

Hi David

We followed the instructions in the Spark JDBC connection guide. We think the problem might have something to do with a library, but we're not sure

Below is the query:

cacheDF = spark.read \
    .format('jdbc') \
    .option('url', connectString) \
    .option("query", "select AdjudicatedSvcNum from CLAIMS.AdjudicatedSvcs") \
    .option('user', user) \
    .option('password', password) \
    .option('driver','com.intersystems.jdbc.IRISDriver') \
    .load()
cacheDF.show()

We followed the instructions in the Spark JDBC connection guide. We think the problem might have something to do with a library, but we're not sure

Below is the query:


cacheDF = spark.read \
    .format('jdbc') \
    .option('url', connectString) \
    .option("query", "select AdjudicatedSvcNum from CLAIMS.AdjudicatedSvcs") \
    .option('user', user) \
    .option('password', password) \
    .option('driver','com.intersystems.jdbc.IRISDriver') \
    .load()
cacheDF.show()