microsoft / semantic-link-labs

Early access to new features for Microsoft Fabric's Semantic Link.
MIT License
176 stars 35 forks source link

Create blank semantic model with lakehouse connection and required tables and columns #79

Closed blaine12100 closed 2 months ago

blaine12100 commented 3 months ago

Describe the bug What I am trying to do is to create a blank semantic model, connect it to a lakehouse in the workspace, define the tables and the columns that I need from the Lakehouse and to add them to my semantic model.

I am able to create a custom semantic model using the create_blank_semantic_model function along with the add_table and add_column functions. The issue that I'm facing is I want to connect this semantic model to a lakehouse in the workspace where I'm creating this semantic model in so that the data is linked to the semantic model.

Possible solution:

Create blank semantic model. Use directlake subpackage to import all tables and columns from the lakehouse Hide / delete objects from the semantic model as required. I would like to avoid the above approach as it's duplicate work (Add all columns and then remove the ones that you don't need)

Expected behaviour Being able to use different functions to create a blank semantic model, connect to the lakehouse, add the necessary tables and the required columns in the semantic models

Additional context I am not sure how can we achieve this functionality

m-kovalsky commented 2 months ago

Try using the generate_direct_lake_semantic_model function in 0.7.0.