Skip to main content

Hi, 


i've setup a MDW layer with proper relations between tables. At this point I wanted to create a relation diagriam to visualise to my client the relation between his entities. 


my tool of choice was SQL Management Studio. Only then i've realised that DH only create DW_Id as physical primary key and the relations between tables are managed internally


 


Is there a way in DH to visualize the relations between the tables? 


I've already put my vote here


https://support.timextender.com/hc/en-us/community/posts/360000924546-Relation-Diagram-based-on-total-layer?input_string=database%20diagram%3A%20visualize%20your%20data%20model  

Hi Andrea, 


 


Yes, I'm aware of that feature. I have several fact tables in my model and i would love to see the interactions between all of them (on layer perspective as oppose to table perspective)


Hi Dror, 


Thanks for your post. 


Alternatively you can set the relationship type to "Error with Physical Relation". This will create a physical foreign key in the database. Then you can use SQL server or a 3rd party tool to visualize the data model. The downside of this approach is (and this applies to all SQL foreign keys) it will discard all results in the table without a matching value in the related table. So you will need to implement an "unknown member" in dimension tables to handle this occurrence.


Hope that helps. 


Hi Joseph, 


 


Sounds good. Unfortunaly it's not working for me. I'm getting the following error: 


Physical relation error(s):
The relation organizations_organizationId must be a unique index on the primary field organizationId.


 


What am i'm doing wrong? 


 


 


Hi Dror, This is likely due to creating the relation in the wrong direction. In Discovery Hub, relations should be created by dragging from the "one" the the "many" of  a one-to-many relationship. 


Hi Joseph, 


 


The relation direction are properly configured (from one to many). 


Table primary key remains to be 'DW_Id ' 


A5FLE33wNI5mmuPJuqjtZg.pngAkWDJztr8PUrlojSsul0JA.png


Reply