import jaydebeapi
print("LOADING.....")
conn = jaydebeapi.connect(
"io.crate.client.jdbc.CrateDriver",
"jdbc:crate://127.0.0.1:2000/",
["user", "password"],
"/home/test/test/test/spark_demo/crate-jdbc-standalone-2.7.0.jar")
print("CONNECTED.....")
curs = conn.cursor()
curs.execute("SELECT * FROM doc.test LIMIT 5")
print("FETCHING.....")
result = curs.fetchall()
print(result)
curs.close()
conn.close()
I am trying to connect CrateDB using jdbc as part of implementing spark, but it is not establishing the connection, it is stuck after printing loading, there is no error as well, here I am unable to fetch or update something to DB.
Crate version 5.2.8
DB is running and accessible on loacl host on the given port, there is no network restrictions, when I tried on colleague’s laptop, getting the same
I would be grateful if anyone can help
Advise from those who connected CrateDB using JDBC