web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Azure Databricks Execu...
Copilot Studio
Suggested Answer

Azure Databricks Execute a SQL statement Tool in Copilot Studio

(1) ShareShare
ReportReport
Posted on by 2
I'm trying to use the Execute a SQL statement tool in a Copilot Studio agent. I get the following error when I try to use it:
 
Evaluating PowerFx expression resulted in error while invoking the connector : PVA.SqlExecuteStatement failed: PowerFxJsonException Expecting Record but received a String, in result/data_array Error code: ConnectorPowerFxError.
 
In the response body from Databricks, result.data_array is an array of arrays of strings, why is it expecting a record?
 
I've used the same tool with the same query in Power Automate and it works fine.
I have the same question (0)
  • Suggested answer
    Prasad-MSFT Profile Picture
    Microsoft Employee on at
    This error occurs because Copilot Studio (Power Virtual Agents) expects the connector response to be an array of records (objects), not an array of arrays (lists of lists). PowerFx requires structured data (records with named fields) for parsing and binding.
    Why does Power Automate work?
    Power Automate is more flexible with data types and can handle arrays of arrays, but Copilot Studio/PowerFx expects a record structure for each row.
     
    How to Fix?
    Modify the connector or tool to return an array of records.
    Instead of:
    [
      ["value1", "value2"],
      ["value3", "value4"]
    ]
    Return:
    [
      { "col1": "value1", "col2": "value2" },
      { "col1": "value3", "col2": "value4" }
    ]
     
    If you control the connector/tool:
    Map the array of arrays to an array of objects before returning to Copilot Studio.
    If you don’t control the connector:
    Use a Power Automate flow or an intermediate step to transform the data into records before passing to Copilot Studio.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard