Loading Databricks updates...
← All video guides
Unity Catalog & Governance

Unity Catalog: Primary Keys & Power BI SSO Connection

Learn how to define primary and foreign keys in Unity Catalog Delta tables and connect Power BI using Serverless SQL Endpoints with Azure AD SSO.

In short

Learn how to define primary and foreign keys in Unity Catalog Delta tables and connect Power BI using Serverless SQL Endpoints with Azure AD SSO.

Source: official Databricks documentation · Databricks announcement

Key takeaways

  • Primary and foreign keys in Unity Catalog Delta tables enable relationship definition in Data Explorer.
  • Primary and foreign keys are informational (not enforced for integrity) but help tools like Power BI.
  • Serverless SQL endpoints provide connectivity for Power BI direct query mode.
  • Azure AD SSO authentication allows Power BI users to query without separate credentials.
  • Single-column primary keys only; composite keys are not yet supported.
  • Keys work only on Delta tables in Unity Catalog, not external tables.

Chapters

  • 0:00 — Introduction: PK/FK in UC & Power BI
  • 0:01 — Step 1: Define Primary & Foreign Keys
  • 1:04 — Step 2: Verify Keys in Data Explorer
  • 1:41 — Step 3: Create Serverless SQL Endpoint
  • 2:14 — Step 4: Configure Power BI Connector
  • 2:56 — Step 5: Authenticate via Azure AD SSO
  • 3:27 — Conclusion: Limitations & Next Steps

Frequently asked questions

What are primary and foreign keys in UC?

PK/FK are metadata on Delta tables showing relationships. They don't enforce integrity but let BI tools understand relationships and optimize queries. Single-column only currently.

How do you query UC tables from Power BI?

Create a serverless SQL endpoint, configure the Power BI Databricks connector with the HTTP path, select direct query mode, and authenticate via Azure AD SSO.

What is direct query mode?

Direct query pushes filtering and aggregation to Databricks instead of importing data. This ensures fresh data and reduces Power BI import size.

What limitations exist for keys?

Only single-column primary keys are supported. Composite keys (multi-column) are not yet available, limiting relationship modeling for some schemas.

Full transcript

Auto-generated from the video and lightly edited for readability. Timestamps link to the moment in the video.

Show full transcript (10 segments)

0:01and now what you will do I will go and create my first table called table persons and pets and I will create a primary key called first name and I will reference this one as a foreign key and then I will insert some some data keep in mind that's primary keyword for

0:23it is Works only for Delta tables in the unity catalog this is something very very important and yes I need to create the catalog here it's got a little bit more yourself then I will run let me create this specific

0:46table and then after this I will show you how it feels like in in the data Explorer I will go into the data Explorer over here

1:08and keep in mind that's primary keys and foreign Keys over here does not enter in enforce integrity so if I go to Gmail users test LLC persons so this is the primary key and there's this is the foreign the foreign key

1:30so now what I'm gonna do I will go to the SQL endpoint I will start my serverless endpoints I'll get the connection details and now what I will do see

1:55it gets the type power bi hello databricks plugin I'll add the sequel endpoints the HTTP path

2:17choose direct query mode then okay and something very very important you can log in using SSO for my case I need to I will log into SSO so as your access directory I will log in over here I will enter my credentials

2:56and now with SSO I will log in and I will be able to access the data I have in my in my in my data Lake I will look for demo qcs

3:18and I will select my test I will select my two tables and I'm gonna load that and you will see that it will bring the data and it will populate the data model for me just keep in mind that we only support without support composite keys this is

3:41something very important so far we don't support composite keys and if I go to data model you will see that my table is already referenced thank you for for uh watching this video

Official Databricks resources

Related

Databricks Answers

Looking for a quick, source-backed answer? Browse Databricks Answers on Unity Catalog, governance & security — direct, documentation-validated answers to common Databricks questions, curated by Youssef Mrini, Senior Developer Advocate at Databricks.