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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
smpa01
Super User
Super User

Does primary/foreign key through datamart get carried over to AZURE SQL

If I ingest my data in a datamart and use Table.AddKey to specify primary/foreign keys in the table,

does the key get carried over to the SQL view that I can access on the AZURE SQL db?

 

The tables ingested in datamart create views on the db and hence, scopes are limited to creating any implicit index. But if I can ensure that the keys are getting carried over, I can ensure some performance optimization.

 

@TomMartens 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 REPLY 1
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

@smpa01 - Hi Tom, I see where you are going with this, but I guess it will be a limitation of the Views in the SQL DB.  Power BI can see the Foreign and Primary keys because of the metadata relationship tables that created.  Otherwise Power BI would not or would guess the key from the Model.Views.  

If you are trying to import the Datamart in Azure DB (i.e. not Power BI), then the developer of the Azure Sql would need equivalent metadata object to use a guide to understanding the model views??

DarylLynchBzy_0-1655316427240.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors