cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Agent outside databricks communication with databricks delta table

Kushal_2612
Visitor

Hello community,

I have following use case in my project:

User[ Ask any query in simple english related to data] -> AI Agent -> Databricks unity catalog -> Delta table.

Currently required data for project is in volume of workspace. Then we apply medallion architecture on that handling crash recovery also of data and then stored final data as delta data as a schema in my workspace. Now end product is that when a user ask a question related to data to AI Agent it will use SQL query to answer that question. My question is that here which method I should use to connect my AI agent with databricks?. I have used databricks API method but it is taking so much time for getting response. 

1 REPLY 1

data_pulse
New Contributor II

@Kushal_2612 

Since you are already using Databricks API and seeing high latency, Check the below once as it needs to be validated for API/ Compute Latency.

  • Is the SQL warehouse already running, or is each request waiting for compute startup?
  • How long does the generated SQL query itself take when run directly in Databricks?
  • Is the API call asynchronous and spending time polling for completion?
  • Is the AI agent itself taking most of the time to generate SQL / process the result?

So first benchmark the same query directly against a Serverless SQL Warehouse. If that is fast but the current API flow is slow, then the bottleneck is likely the API/agent orchestration rather than the Delta table itself.

If your agent already generates SQL, a Serverless SQL Warehouse + Databricks SQL Connector is worth testing instead of repeatedly using REST/polling. Can check the reference.

If the intent is really natural language based analytics, then Genie Agent is a better fit because Databricks handles the NL to SQL layer seamlessly.