Error while connecting to Databases in DataBrick Community Edition on Cloud
Hi, I have downloaded repository and I was able to execute and practice all example . But when I am trying to execute examples related to SQL data source from Chapter 9 Data Source I am getting following error. I don't have any clue on what to do so please guide me. Thanks in advance. Error"Java.sql.SQLException: path to '/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db': '/databricks-datasets' does not exist"
Path do exists when I run %fs ls and I get following
dbfs:/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db
Following are parameters
driver = "org.sqlite.JDBC" path = "/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db" url = "jdbc:sqlite:" + path tablename = "flight_info"
Hi,
i think path should be /dbfs/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db
Thanks & Regards, Hitesh Tiwari
On Wed, Aug 19, 2020 at 8:43 PM joshipm [email protected] wrote:
Hi, I have downloaded repository and I was able to execute and practice all example . But when I am trying to execute examples related to SQL data source from Chapter 9 Data Source I am getting following error. I don't have any clue on what to do so please guide me. Thanks in advance. Error"Java.sql.SQLException: path to '/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db': '/databricks-datasets' does not exist"
Path do exists when I run %fs ls and I get following
dbfs:/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db
Following are parameters
driver = "org.sqlite.JDBC" path = "/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db" url = "jdbc:sqlite:" + path tablename = "flight_info"
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/databricks/Spark-The-Definitive-Guide/issues/60, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACV2AHNVDLOUDIEV4FHS7ETSBQMNRANCNFSM4QFHW4HQ .
Hi , Just tried doesn’t work. I assume you want to include that in double quotes. RegardsPrasad Sent from Mail for Windows 10 From: hiteshtiwariSent: Wednesday, August 19, 2020 4:42 PMTo: databricks/Spark-The-Definitive-GuideCc: joshipm; AuthorSubject: Re: [databricks/Spark-The-Definitive-Guide] Error while connecting to Databases in DataBrick Community Edition on Cloud (#60) Hi,i think path should be*/dbfs/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db*Thanks & Regards,Hitesh TiwariOn Wed, Aug 19, 2020 at 8:43 PM joshipm
did this work for you? i tried all options and it it is failing.
driver = "org.sqlite.JDBC" path = "/dbfs/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db" url = "jdbc:sqlite:" + path tablename = "flight_info"
dbDataFrame = spark.read.format("jdbc").option("url", url).option("dbtable", tablename).option("driver", driver).load()
Py4JJavaError: An error occurred while calling o570.load.
: java.sql.SQLException: path to '/dbfs/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db': '/dbfs/databricks-datasets' does not exist
at org.sqlite.core.CoreConnection.open(CoreConnection.java:192)
at org.sqlite.core.CoreConnection.
i even tried with below
driver = "org.sqlite.JDBC" path = "/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db" url = "jdbc:sqlite:" + path tablename = "flight_info"
dbDataFrame = spark.read.format("jdbc").option("url", url).option("dbtable", tablename).option("driver", driver).load()
but similar error.
Py4JJavaError: An error occurred while calling o589.load.
: java.sql.SQLException: path to '/databricks-datasets/definitive-guide/data/flight-data/jdbc/my-sqlite.db': '/databricks-datasets' does not exist
at org.sqlite.core.CoreConnection.open(CoreConnection.java:192)
at org.sqlite.core.CoreConnection.