microsoft / semantic-link-labs

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

Import Model To Direct Lake Migration #202

Open cvlmonica opened 1 month ago

cvlmonica commented 1 month ago

While doing the migration from import mode to direct lake. It is considering #Measures as calculated table and it is stopping the migration.

Image

What should we do here?! Any suggestions so that the Semantic-Link-Labs ignores this!?

m-kovalsky commented 1 month ago

What is the '# Measure' table? Is it a regular data table? Does it have any columns? Please share more details on the properties of this table.

cvlmonica commented 1 month ago

Yes, It is an empty calculated table! to place all the measures at one place! Since we cannot have an empty table in lakehouse? how to do this?

m-kovalsky commented 1 month ago

You need to create a sort of 'dummy' table in the lakehouse, as such, add it to the model, and place all the measures in that table.

import sempy_labs as labs
import pandas as pd

df = pd.DataFrame(columns=['NewCol'])
schema = {
    "NewCol": "str",
}
labs.save_as_delta_table(dataframe=df, delta_table_name="MeasuresTable", write_mode='overwrite', schema=schema)
cvlmonica commented 1 month ago

I have tried running the above script and created an measures table and when I trying to run the migrate_model_objects_to_semantic_model() function, it is throwing below error:

Few measures are getting created which are not part of that measures table.

Image

Image

With this, what is happening is it is breaking at this point and it cannot create other objects in semantic model!

cvlmonica commented 4 weeks ago

Hi! any solution on this?

m-kovalsky commented 3 weeks ago

What is the Dax behind the '# measures' calculated table?

cvlmonica commented 1 week ago

This is an empty calculated table which we are storing the all the measures. So it is an empty calculated table!

m-kovalsky commented 1 week ago

Please share the DAX behind the calculated table

cvlmonica commented 1 week ago

Yes sharing the DAX

Measures =

m-kovalsky commented 1 week ago

Where is the dax?