1

Currently I am using Spark 3.2.0 with Trino 363. I am trying to connect to Trino but I am getting an error. Error message is as below.

Exception in thread "main" java.sql.SQLException: Unrecognized connection property 'url'

Please find below code which I am using.

    val sparkSession = SparkSession.builder().appName("Trino-Spark")
                                    .master("local[*]")
                                    .getOrCreate()

    val properties = new Properties()
    properties.setProperty("SSL", "true")
    properties.setProperty("SSLVerification", "NONE")
    properties.setProperty("user", "USERNAME")
    properties.setProperty("password", "PWD")

    val df = sparkSession.read.jdbc("jdbc:trino://HOST:PORT/hive", "hive.TABLE_NAME", properties)

    println(s"Count: ${df.count()}")

Please could anyone help me to point out what is wrong here. Thanks in advance.

RAJ PATEL
  • 554
  • 4
  • 12

1 Answers1

1

I was able to run spark 3.2.0 with Trino 363. I have commented out below mentioned line and re build JDBC driver.

Trino 363 JDBC Driver

RAJ PATEL
  • 554
  • 4
  • 12
  • Your change allows to pass in properties that are not being used or passed through by the JDBC driver. Why do you think that makes sense? Could you maybe file an issue in Trino. – Manfred Moser Sep 27 '22 at 18:14