Cannot connect to Databricks resource

I am trying to connect to Databricks using a JDBC URL connection and a Personal Access Token (PAT) in Retool. The expected behavior is to establish a successful connection between Retool and Databricks, allowing me to access and query data from Databricks within my Retool application.

  • Steps:
    1. I obtained a Personal Access Token from Databricks with the necessary permissions.
      1.1 We are not sure if this PAT is indeed the correct credential that retool is expecting.
    2. I provided the following JDBC URL in the Retool Databricks connection settings:

JDBC Connection string structure:


I replaced <databricks-instance> with my Databricks instance hostname, <http-path> with the appropriate HTTP path, and <personal-access-token> with my actual Personal Access Token.

I clicked on "Test Connection" to verify the connection, but it throws a Unprocessable Entity 422 error.

With the URL string connection, I do get all the fields populated as shown in the attached image.

I have reviewed the Databricks documentation and double-checked the fields we are sending, but I'm still unsure which specific fields or values are causing the issue. Could you please provide more guidance on the required fields and their expected formats for this particular Databricks connection?

Additionally, if possible, could you share any common pitfalls or missing fields that often lead to a 422 error in this context? I would greatly appreciate any insights or examples you can offer to help us resolve this error and successfully create the Databricks resource.

Thanks for the help!


Hello @Jose_Suarez!

422 errors are tricky to trouble shoot, but I will be trying to reproduce the error and comparing my set up against yours to see where it might be stemming from.

From my first look of your screenshots it appears you followed the docs for the DB set up correctly. Are you self hosted or on the cloud?

It sounds like you used database connection string to automatically fill credentials, have you tried manually put in the credentials?

It might be a tiny issue with the end of value having an extra character or being wrapped in extra characters.

@Jose_Suarez it looks like I was able to reproduce the 422 error by giving an incorrect PAT in the 'API Key' section of the resource setup.

From looking at the Databricks docs it seems that they only API Key they provide for validating identity is a PAT, so I don't believe there is any other key that would work in place of a valid PAT.

I would recommend checking to see if you PAT might have expired, as well as generating a new PAT from your developer dashboard in Databricks and seeing if manually adding that in might get fix the 422 error. :crossed_fingers:

While trying to replicate the bug, my team-mate found that if you use the auto fill option, then swap out the default password that gets put into the API Key section with the newly created PAT that it should work.

Let me know if the bug still is occurring with a new PAT :sweat_smile: