โ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
})
โ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 a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group