06-18-2021 01:13 PM
I am trying to read from a databricks table. I have used the url from a cluster in the databricks. I am getting this error:
java.sql.SQLDataException: [Simba][JDBC](10140) Error converting value to int.
After these statements:
jdbcConnUrl= "jdbc:spark://adb....."
testquery="(select * from db.table limit 3)"
testdf=spark.read.format("jdbc").option("url", jdbcConnUrl).option("dbtable", testquery).option("fetchsize", "10000").load()
testdf.show()
I have come across all Scala solutions for this issue but I am using python. I want a python equivalent of this code:
import org.apache.spark.sql.jdbc.{JdbcDialect, JdbcDialects}
JdbcDialects.registerDialect(new JdbcDialect() {
override def canHandle(url: String): Boolean = url.toLowerCase.startsWith("jdbc:spark:")
override
def quoteIdentifier(column: String): String = column
})
09-02-2021 06:34 AM
Hi @ User16217864942579505928! My name is Kaniz, and I'm a technical moderator here. Great to meet you, and thanks for your question! Let's see if your peers on the Forum have an answer to your questions first. Or else I will follow up shortly with a response.
12-22-2022 10:47 PM
Hi @Brad Powell, Were you able to solve this issue in Python. I'm also struck with this issue in python, solution is available only in Scala and need this solution in python. Could you please help me in solving this issue. Thanks
12-26-2022 06:30 AM
It was helpfull thank you
12-30-2022 10:13 AM
Hi @Brad Powell / @Kaniz Fatma / @S Meghala - Any update on this?
06-28-2023 03:20 AM
is there a solution for this?
06-30-2023 08:37 AM - edited 06-30-2023 11:45 AM
I was able to solve this
Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections.
Click here to register and join today!
Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.