Forum Discussion
Semantic Link Lab - Create Data Model
- 6 months ago
Hi KarenL7,
It means a semantic model named ModelBPA already exists in that workspace, and at least one table has already been added to it. Sempy Labs (by design) reuse an existing model if the name matches, and does not auto-overwrite or merge. Your next step would be to find the semantic model named ModelBPA, delete it and re-run your code.
One important thing to note (just mentioning) is sempy_labs.create_model_bpa_semantic_model() function defaults dataset to 'ModelBPA' (if not mentioned explicitly).
Hi KarenL7,
Thank you for reaching out to the Microsoft Fabric Community Forum.
The error you are seeing isn’t related to the Lakehouse table, but to an existing semantic model in the workspace. Even if ModelBPA feels like a new dataset, a semantic model with that name was likely created during a previous notebook run or BPA execution. When create_model_bpa_semantic_model() runs again, it attempts to add the same table to that existing model, which causes the “table already exists” error.
To resolve this, either delete the existing semantic model (dataset) named ModelBPA from the workspace and rerun the notebook, or use a new dataset name (for example, ModelBPA_v2).
Hope that clarifies. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
Good advice, but please be aware that renaming the new dataset name can have repurcussions if looking to deploy the BPA report as well.