bigquery-emulator icon indicating copy to clipboard operation
bigquery-emulator copied to clipboard

Connection error using BigQueryJDBCDriver version 1.3.2

Open sanbor opened this issue 2 years ago • 3 comments

I connect to biguqyer-emulator using JDBC BigQuery driver in IntelliJ. Today I updated the JDBC driver to version 1.3.2 and it stopped working. Rolled back to version 1.3.0 and it works fine.

The error I get with version 1.3.2 is [HY000][100007] [Simba][BigQueryJDBCDriver](100007) Failed to retrieve: PSC end point does not have correct value.

The URL I'm using to connect is jdbc:bigquery://https://localhost/:9050;RootURL=http://localhost:9050;ProjectId=<redacted>;DefaultDataset=<redacted>

The release notes of JDBC driver are here: https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers#jdbc_release_132_1003 Not sure is related, but there is the following message

Caution: To comply with the Google deprecation of the out-of-band (OOB) authorization flow, JDBC version 1.3.2 introduces changes that may require you to reauthenticate and/or recreate your connection strings. This is because the user account flow has changed and no longer supports the deprecated out-of-band flow. See the Install and configuration guide for more details.

sanbor avatar Apr 04 '23 09:04 sanbor

when working with 1.3.0, what OAuth did you provide in the connection string ?

adilev26 avatar May 14 '23 08:05 adilev26

I have done some experiment. looks like since version 1.3.2, RootURL requires to use an https connection

kankaiz avatar Oct 14 '23 17:10 kankaiz

Thank you for your exploration! #278 addresses this by adding an HTTPS endpoint to the emulator.

@adilev26 My understanding is that a valid GCP OAuth configuration must be specified as OAuth cannot be disabled in the JDBC driver.

ohaibbq avatar Mar 05 '24 20:03 ohaibbq