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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Scott_Powell
Advocate III
Advocate III

Is it possible to have "role playing dimensions" in a DirectLake semantic model?

Hi, is it possible to include the same dimension table twice in a DirectLake semantic model? Or do I literally have to build the same table two times in the Lakehouse / Warehouse?

 

I'm thinking it's not possible - it doesn't seem like the UI allows you to do it, and even if it did you can't change table names so there would be no way to take our "Date" table and call one copy "Admit date" and the other "Discharge date". Just trying to verify to make sure I'm not missing something.

 

Thanks,

Scott

1 ACCEPTED SOLUTION
AndyDDC
Solution Sage
Solution Sage

Great question @Scott_Powell .  Nope, renaming tables in the semantic model doesn't seem to be supported.  The only 2 options I thought of were:

 

  • Create a shortcut to the table in the same Lakehouse, but you have no control over the name (table would just appear with _1, _2 appended to the table name) and shortcuts can't be created in Warehouses
  • Clone the table with the relevant name.  You could do this after data loading.  E.G load the base table and then drop/create clone of the table.  This works for lakehouses (notebook) and warehouses (sql)

View solution in original post

6 REPLIES 6
frithjof_v
Continued Contributor
Continued Contributor

I think you can specify the name of a shortcut now, so you can customize what name it gets. In that respect, role-playing dimensions seem to be a viable option in Lakehouses

 

With regards to clones I think they are different from shortcuts in that the clone will not reflect subsequent changes to the data in the original table. I guess that is why we would need to ensure that we drop and recreate the clone table every time an update is made in the source table. But I am wondering if that means that any model relationships involving the clone table would also break and then would need to recreate the relationship manually every time. If that is true, then I feel that role-playing dimensions are not a viable option in data warehouse (except for dimensions which  change so infrequently that doing these manual changes would be practical)

 

I will vote for the idea @Scott_Powell 💡

Thank you @frithjof_v . Wasn't aware that you could rename shortcuts, I'll definitely take a look at that. But I will say that in general I don't consider that a solution. It's not just the table but the columns that need renamed - when a user sees "date" on a report they have no idea whether it's admission date, discharge date, etc. At least in my case I really like the names of the columns to be distinct so there's never ambiguity on what a column refers to.

 

Appreciate the vote - thanks!

Scott

v-cboorla-msft
Community Support
Community Support

Hi @Scott_Powell 

 

Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.

Scott_Powell
Advocate III
Advocate III

hi @AndyDDC yep option #2 is the one I was already thinking of. Would be nice to have proper support for role playing dimensions though. We have similar needs with our provider dimenion - there's roles like admitting provider, attending provider, primary care physician, discharge provider, etc. I haven't done "cloning" before, I was just going to create exact copies of the original table and fully populate via ETL. I'll definitely check it out though - thanks for the heads up!

 

Scott

FYI - I opened the following idea to allow for role playing dimensions, please vote it up!

 

https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=c070d975-9d98-ee11-a81c-000d3ad92a48

 

Thanks,

Scott

AndyDDC
Solution Sage
Solution Sage

Great question @Scott_Powell .  Nope, renaming tables in the semantic model doesn't seem to be supported.  The only 2 options I thought of were:

 

  • Create a shortcut to the table in the same Lakehouse, but you have no control over the name (table would just appear with _1, _2 appended to the table name) and shortcuts can't be created in Warehouses
  • Clone the table with the relevant name.  You could do this after data loading.  E.G load the base table and then drop/create clone of the table.  This works for lakehouses (notebook) and warehouses (sql)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

March 2024  FBC Gallery Image

Fabric Monthly Update - March 2024

Check out the March 2024 Fabric update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Kudoed Authors