Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ranjitsingh
Advocate I
Advocate I

Querying Database Schema

Hello there!

 

I'm trying to build a data model in Power BI relationship view using a subset of tables from the original Sql server. I'm finding it difficult to connect 2 tables ( patient_info and Lab_Results) as there is no direct foreign key from one to another to establish a relationship. I do know they are connected in the original database as we can run reports there. However, I'm not sure how they are connected within the original database ie what tables might exist between them as I don't have a database schema and this is making it difficult for me to bring in the right intermediary tables within Power BI.


So my question is if there is a way to automatically discover the schema of the original source DB (Sql Server) using Power BI ?


@schema 

 

3 REPLIES 3
lbendlin
Super User
Super User

Sorry to hear that.  Yes, I have been in such situations. I had the luxury of telling them in mostly polite terms that they may want to find someone else for the job.  Not sure if you have that option.

ranjitsingh
Advocate I
Advocate I

My client's database is from a 3rd party, that is refusing to provide their database schema or even the primary/foreign keys for a subset of tables. I want to connect Lab results table to the patient table but there isn't any foreign key in the fact table (Lab table) pointing to the patient table..In this situation, i'm thinking there must be some intermediary or bridge table somewhere..but the database is HUGE. I'm going to have to explore every relevant looking table that has lab or patient on it..thats why was thinking of an easier way.

 

Have you come across a situation when client isn't able to provide a database schema ? (All I got was a document with ~ 35000 fields) what do you do in these situations ??

lbendlin
Super User
Super User

Are you sure you want to do that?  We always recommend to the developers in our company to disable these settings and to wire our data models manually for better control.

 

lbendlin_0-1616462950318.png

 

If you must, check the first box.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.