<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Ontology Path Query returns incorrect in IQ</title>
    <link>https://community.fabric.microsoft.com/t5/IQ/Ontology-Path-Query-returns-incorrect/m-p/5277668#M151</link>
    <description>&lt;P&gt;Microsoft Fabric Ontology (Preview) - Possible Relationship Resolution Bug&lt;/P&gt;&lt;P&gt;Title&lt;/P&gt;&lt;P&gt;Ontology Path Query returns incorrect VisitOccurrence records by matching entity key values instead of configured relationship mappings.&lt;/P&gt;&lt;P&gt;Environment&lt;/P&gt;&lt;P&gt;Microsoft Fabric, Ontology (Preview), OMOP CDM dataset, Lakehouse tables, Entity Types: Person and VisitOccurrence.&lt;/P&gt;&lt;P&gt;Objective&lt;/P&gt;&lt;P&gt;Create a relationship Person -&amp;gt; person_has_visit -&amp;gt; VisitOccurrence using visit_occurrence.person_id -&amp;gt; person.person_id.&lt;/P&gt;&lt;P&gt;Test Data&lt;/P&gt;&lt;P&gt;Person table contains person_id values 10 and 12. VisitOccurrence contains: (10,1001), (12,2001), (12,2002), (12,2003).&lt;/P&gt;&lt;P&gt;Expected Relationships&lt;/P&gt;&lt;P&gt;Person(10)-&amp;gt;VisitOccurrence(1001); Person(12)-&amp;gt;VisitOccurrence(2001), VisitOccurrence(2002), VisitOccurrence(2003).&lt;/P&gt;&lt;P&gt;Entity Configuration&lt;/P&gt;&lt;P&gt;Person entity key: person_id. VisitOccurrence entity key: visit_occurrence_id. Both entities bound directly to their corresponding key columns.&lt;/P&gt;&lt;P&gt;Relationship Configuration&lt;/P&gt;&lt;P&gt;Relationship name: person_has_visit. Origin entity: Person. Target entity: VisitOccurrence. Mapping table: visit_occurrence. Mapping: Person key mapped to person_id column; VisitOccurrence key mapped to visit_occurrence_id column.&lt;/P&gt;&lt;P&gt;Expected Result&lt;/P&gt;&lt;P&gt;Path Query for Person(12) should return VisitOccurrence IDs 2001, 2002 and 2003.&lt;/P&gt;&lt;P&gt;Actual Result&lt;/P&gt;&lt;P&gt;Path Query returns an incorrect VisitOccurrence record. Earlier testing returned VisitOccurrence(12), whose properties showed person_id = 3. Therefore Person(12) was linked to a visit belonging to Person(3).&lt;/P&gt;&lt;P&gt;Why This Appears To Be A Bug&lt;/P&gt;&lt;P&gt;The source data contains no relationship between Person(12) and VisitOccurrence(12). The graph output appears inconsistent with both the configured relationship and the source data.&lt;/P&gt;&lt;P&gt;Troubleshooting Performed&lt;/P&gt;&lt;P&gt;Recreated VisitOccurrence table with a minimal dataset; rebound entity types; verified entity keys; recreated relationship; published ontology; used unique non-overlapping IDs to eliminate ambiguity.&lt;/P&gt;&lt;P&gt;Possible Causes&lt;/P&gt;&lt;P&gt;1. Relationship instances not regenerated after binding changes. 2. Ontology using stale/cached relationship data. 3. Path Query traversing using entity key/label equality instead of generated relationship instances. 4. Graph Explorer resolving nodes incorrectly.&lt;/P&gt;&lt;P&gt;Request To Fabric Team&lt;/P&gt;&lt;P&gt;Please confirm how relationship instances are materialized, whether Path Query uses relationship instances or labels/keys, whether ontology relationship data is cached after rebinding, and whether this is a known issue in Ontology Preview.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2026 00:04:38 GMT</pubDate>
    <dc:creator>ArshadMu</dc:creator>
    <dc:date>2026-07-08T00:04:38Z</dc:date>
    <item>
      <title>Ontology Path Query returns incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/IQ/Ontology-Path-Query-returns-incorrect/m-p/5277668#M151</link>
      <description>&lt;P&gt;Microsoft Fabric Ontology (Preview) - Possible Relationship Resolution Bug&lt;/P&gt;&lt;P&gt;Title&lt;/P&gt;&lt;P&gt;Ontology Path Query returns incorrect VisitOccurrence records by matching entity key values instead of configured relationship mappings.&lt;/P&gt;&lt;P&gt;Environment&lt;/P&gt;&lt;P&gt;Microsoft Fabric, Ontology (Preview), OMOP CDM dataset, Lakehouse tables, Entity Types: Person and VisitOccurrence.&lt;/P&gt;&lt;P&gt;Objective&lt;/P&gt;&lt;P&gt;Create a relationship Person -&amp;gt; person_has_visit -&amp;gt; VisitOccurrence using visit_occurrence.person_id -&amp;gt; person.person_id.&lt;/P&gt;&lt;P&gt;Test Data&lt;/P&gt;&lt;P&gt;Person table contains person_id values 10 and 12. VisitOccurrence contains: (10,1001), (12,2001), (12,2002), (12,2003).&lt;/P&gt;&lt;P&gt;Expected Relationships&lt;/P&gt;&lt;P&gt;Person(10)-&amp;gt;VisitOccurrence(1001); Person(12)-&amp;gt;VisitOccurrence(2001), VisitOccurrence(2002), VisitOccurrence(2003).&lt;/P&gt;&lt;P&gt;Entity Configuration&lt;/P&gt;&lt;P&gt;Person entity key: person_id. VisitOccurrence entity key: visit_occurrence_id. Both entities bound directly to their corresponding key columns.&lt;/P&gt;&lt;P&gt;Relationship Configuration&lt;/P&gt;&lt;P&gt;Relationship name: person_has_visit. Origin entity: Person. Target entity: VisitOccurrence. Mapping table: visit_occurrence. Mapping: Person key mapped to person_id column; VisitOccurrence key mapped to visit_occurrence_id column.&lt;/P&gt;&lt;P&gt;Expected Result&lt;/P&gt;&lt;P&gt;Path Query for Person(12) should return VisitOccurrence IDs 2001, 2002 and 2003.&lt;/P&gt;&lt;P&gt;Actual Result&lt;/P&gt;&lt;P&gt;Path Query returns an incorrect VisitOccurrence record. Earlier testing returned VisitOccurrence(12), whose properties showed person_id = 3. Therefore Person(12) was linked to a visit belonging to Person(3).&lt;/P&gt;&lt;P&gt;Why This Appears To Be A Bug&lt;/P&gt;&lt;P&gt;The source data contains no relationship between Person(12) and VisitOccurrence(12). The graph output appears inconsistent with both the configured relationship and the source data.&lt;/P&gt;&lt;P&gt;Troubleshooting Performed&lt;/P&gt;&lt;P&gt;Recreated VisitOccurrence table with a minimal dataset; rebound entity types; verified entity keys; recreated relationship; published ontology; used unique non-overlapping IDs to eliminate ambiguity.&lt;/P&gt;&lt;P&gt;Possible Causes&lt;/P&gt;&lt;P&gt;1. Relationship instances not regenerated after binding changes. 2. Ontology using stale/cached relationship data. 3. Path Query traversing using entity key/label equality instead of generated relationship instances. 4. Graph Explorer resolving nodes incorrectly.&lt;/P&gt;&lt;P&gt;Request To Fabric Team&lt;/P&gt;&lt;P&gt;Please confirm how relationship instances are materialized, whether Path Query uses relationship instances or labels/keys, whether ontology relationship data is cached after rebinding, and whether this is a known issue in Ontology Preview.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2026 00:04:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/IQ/Ontology-Path-Query-returns-incorrect/m-p/5277668#M151</guid>
      <dc:creator>ArshadMu</dc:creator>
      <dc:date>2026-07-08T00:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Ontology Path Query returns incorrect</title>
      <link>https://community.fabric.microsoft.com/t5/IQ/Ontology-Path-Query-returns-incorrect/m-p/5303864#M160</link>
      <description>&lt;P&gt;Thanks for providing such a detailed write-up and the troubleshooting steps you've already completed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on your description, this does sound like a potential issue in the Ontology Preview rather than a configuration problem. If the relationship is defined as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Person.person_id -&amp;gt; VisitOccurrence.person_id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the target entity key is visit_occurrence_id, then a path query for Person(12) should only return the visit occurrences whose person_id = 12. It should never return a visit simply because its visit_occurrence_id happens to equal 12.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you've already:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Verified the entity keys.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Recreated the entities and relationship.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tested with a minimal dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Used non-overlapping IDs to eliminate ambiguity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...it does suggest either:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A stale relationship index or cache that wasn't rebuilt after republishing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An issue in how relationship instances are materialized.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A bug in the Path Query engine or Graph Explorer when resolving relationships.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given that Ontology is still in Preview, this is exactly the type of behavior Microsoft is looking to identify and address. I'd recommend opening a support ticket and providing the minimal reproducible dataset and ontology configuration, as it will be much easier for the product team to investigate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would also be helpful if the Fabric team could clarify:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whether relationship instances are rebuilt automatically after entity or relationship changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whether Path Query traverses persisted relationship instances or resolves relationships dynamically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whether there are any known caching limitations in the current Preview.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what you've described, I would expect the configured relationship mapping to take precedence over any matching key values, so the behavior you're seeing does appear inconsistent with the expected ontology model.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jul 2026 01:10:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/IQ/Ontology-Path-Query-returns-incorrect/m-p/5303864#M160</guid>
      <dc:creator>sannavajjala</dc:creator>
      <dc:date>2026-07-18T01:10:37Z</dc:date>
    </item>
  </channel>
</rss>

