How to Connect ChatGPT to Your Databricks SQL Warehouse

ChatGPT’s website is currently the 5th most visited in the world, according to SimilarWeb. If you’re like most people, you’re probably using it regularly. But did you know you can connect ChatGPT directly to your Databricks SQL Warehouse and let it query your data?

If you are not yet a member of Medium, you can access the extended version on the SunnyData blog for free.

Note: This feature is currently under active development, so the settings and steps may differ by the time you read this.

ChatGPT connects to Databricks using the Model Context Protocol (MCP).

MCP is a new approach that enables ChatGPT to communicate directly with other tools and databases — for example, to send queries to Databricks or retrieve data from it — without requiring additional plugins or manual setup.

Step 1: Create a connection in Databricks

You’ll need to navigate to your Databricks account console to set up the first connection to ChatGPT. This connection will generate a client ID and secret. Note that you’ll still need to authenticate from ChatGPT to Databricks using your personal credentials, which enables credential passthrough and applies your access rights to the SQL warehouse and Unity Catalog objects.

Leave a Reply