Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-36616

Unrecognized connection property 'url' when using Presto JDBC

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.1.1
    • None
    • SQL
    • None

    Description

      Hi,  Here is my spark sql code, where I am trying to read a presto table based on this guide;  https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html

       val df = spark.read
       .format("jdbc")
       .option("driver", "com.facebook.presto.jdbc.PrestoDriver")
       .option("url", "jdbc:presto://localhost:8889/mycatalog")
       .option("query", "select * from mydb.mytable limit 1")
       .option("user", "myuserid")
       .load()
      
      

       
      I am getting the following exception: unrecognized connection property 'url' 

      Exception in thread "main" java.sql.SQLException: Unrecognized connection property 'url'
       at com.facebook.presto.jdbc.PrestoDriverUri.validateConnectionProperties(PrestoDriverUri.java:345)
       at com.facebook.presto.jdbc.PrestoDriverUri.<init>(PrestoDriverUri.java:102)
       at com.facebook.presto.jdbc.PrestoDriverUri.<init>(PrestoDriverUri.java:92)
       at com.facebook.presto.jdbc.PrestoDriver.connect(PrestoDriver.java:87)
       at org.apache.spark.sql.execution.datasources.jdbc.connection.BasicConnectionProvider.getConnection(BasicConnectionProvider.scala:49)
       at org.apache.spark.sql.execution.datasources.jdbc.connection.ConnectionProvider$.create(ConnectionProvider.scala:68)
       at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.$anonfun$createConnectionFactory$1(JdbcUtils.scala:62)
       at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:56)
       at org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation$.getSchema(JDBCRelation.scala:226)
       at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:35)
       at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:354)
       at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:326)
       at org.apache.spark.sql.DataFrameReader.$anonfun$load$3(DataFrameReader.scala:308)
       at scala.Option.getOrElse(Option.scala:189)
       at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:308)
       at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:226)
       at org.apache.spark.sql.DataFrameReader.jdbc(DataFrameReader.scala:341)
       
      
      

      Seems like this issue is related to https://github.com/prestodb/presto/issues/9254 where the property `url` is not a recognized property in Presto and looks like the fix needs to be done on the Spark side?

      Our development is blocked on this exception and would appreciate any guidance. Thanks!

      PS:
      presto-jdbc version: 0.245 / 0.260

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rjkumr Rajkumar Gunasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: