I tried below code, which is providing incorrect data. For String datatype columns, it is providing column name as values for rows and for Integer datatype columns, it is providing 0 as values for rows.

Could someone assist with this issue? or How to read data from InterSystems Cache DB to Databricks using JDBC?

 

df = spark.read \
    .format("jdbc") \
    .option("url", f"jdbc:Cache://{server_ip}:{port}/{namespace}") \
    .option("driver", "com.intersys.jdbc.CacheDriver") \
    .option("dbtable", "(SELECT * FROM Sample.Company) AS t;") \
    .option("user", username) \
    .option("password", password) \
    .option("fetchsize", "1000") \
    .option("pushDownPredicate", "false") \
    .option("pushDownAggregate", "false") \
    .option("pushDownLimit", "false") \
    .load()

df.show() 


Below is the output, I received: