This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hi,
I’ve created a Fabric Data Agent using an Ontology as the data source, and I’m encountering consistent failures even when asking simple questions related to a single entity. Queries that span or join multiple entities also fail.
Below are the details and the error output.
When I ask a basic question (even involving only one entity), the agent returns an error.
For multi-entity questions, it fails with the same pattern.
The error indicates that the generated Ontology query includes invalid aggregation or grouping logic. Specifically, a field is referenced without being part of the GROUP BY clause or wrapped in an aggregation function.
The underlying generated query seems to have a syntax or grouping issue and cannot execute.
Query Output:
Failed to execute step (RAID: 36eb1c04-9e56-4998-89ac-a9a56919482d).
Error: Failed to execute Ontology query with error:
"The query is invalid. Reason: BadRequest. Resource: Graph query (graphModelId=9231e6f0-87b9-44b4-9a36-5ddbe39b8d78).
InternalCode: 42000. Message: syntax error or access rule violation.
Cause: data exception; The identifier node_production_plant.plant_id cannot be used, as it is neither part of the GROUP BY nor an aggregation."
I have already enabled "Support GROUP BY in GQL" in the Data Agent instructions.
What I need help with:
Hi @sadafrakshan ,if this helped you, I’d appreciate it if you could mark it as the accepted solution and give it a like 👍
This helps others in the community find the answer more easily.
Thanks!
Hi @sadafrakshan ,
The issue could be that it is not able to perform the GROUP BY using GQL. This may happen if the Graph feature is not enabled in the administration settings, so I would recommend checking that, as it could be an important point.
Since the agent is using an ontology, it relies on GQL rather than SQL, which is what it would use when querying a Lakehouse directly. As a test, you could try the same question directly against the specific Lakehouse table and compare the behavior.
From your message, I understand that the data agent itself works correctly without the ontology, and that it also works with other types of questions. Is that correct?
If this helped you solve the issue, please mark the response as accepted.
Best regards,
Check out the April 2026 Fabric update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.