Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi!
I read this thread Solved: Re: Building relationship in Fabric Datawarehouse ... - Microsoft Fabric Community and this documentation article Define relationships in data models for data warehousing - Microsoft Fabric | Microsoft Learn which says that when I am creating relationships in the model view of SQL Analytics Endpoint or Data Warehouse, it is automatically being created PK and FK constraints in the SQL tables in order to increase query speed.
I am creating the relationships in the model view, because I want to use them in the Power BI semantic model.
I read in this documentation article Primary, foreign, and unique keys - Microsoft Fabric | Microsoft Learn that the PK and FK constraints are not enforced. But the article also says that the (not enforced) primary key constraint may lead to inaccurate query results if there are duplicate values in the column which has the PK (not enforced) constraint.
So it seems that adding relationships may lead to some errors when running SQL queries on the SQL Analytics Endpoint / Data Warehouse - if the data is not in accordance with the assumptions made in the relationships. Primary, foreign, and unique keys - Microsoft Fabric | Microsoft Learn
It seems there are no checks in the Lakehouse or Warehouse that will prevent duplicate values in the primary key column, because the constraints are not enforced.
I'm just trying to understand 😀 Does my understanding seem right, or am I missing something? Thank you!
Ref. also:
Why is default semantic modelling experience insid... - Microsoft Fabric Community
Solved! Go to Solution.
Hello @fabricator1
Thanks for using the Fabric community.
Your undersanding is correct as PK is not enforced the system will not stop you from entering the duplicate again . While you load you will have to make sure that duplicates are NOT inserted into the table , or may be you periodically clean up duplicate by checking on the table .
Thanks
HImanshu
Hello @fabricator1
Thanks for using the Fabric community.
Your undersanding is correct as PK is not enforced the system will not stop you from entering the duplicate again . While you load you will have to make sure that duplicates are NOT inserted into the table , or may be you periodically clean up duplicate by checking on the table .
Thanks
HImanshu
Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.