Forum Discussion
Fabric - semantic model - refresh
I just started with semantic models in fabric
What is the best way to resync a table a table from the source (i.e add a new column to a table in the model that has been added to the source table).
Currently I am using the edit tables button but it not really what I need in the case since it refresh the whole model.
A part from that it seems be a bit buggy - adding new tables works but using it to refresh current tables does not seem work every time.
How is this supposed to be done?
I found the issue
I had one view in the warehouse with two columns having identical names where one of them had a capital letter
I tried to refresh the warehouse from fabric gui and received the duplicate column name error message
It is fully possible (at least from sql endpoint) to create a view with two columns names aa and Aa for example. However its not supported in semantic models and semabtic model will not give you an indication of this issue
23 Replies
- AndyDDCMost Valuable Professional
Hi joakimfenno for adding new columns to a semantic model, in the Fabric UI you'll need to use the Edit Tables button, but you can filter what tables will be included in the refresh. E.G in the image below I have added a new column to my Warehouse employees tables, but to get that column to appear in a custom semantic model, I need to open the model and click Edit Tables. I can then enable/disable which tables I want the metadata to be refreshed for.
- joakimfennoHelper V
I tried that and selected the table with thenew column only but that made all other tables dissapeared
and not only that, it seems like there is no optioon to reverse the change?In this case my model (datatypes, relations, measures etc.) was huge
Can I reverse the change somehow?
Also, if I have two new columns in a table, how do I add one of them to the model?
and actually, I tried with another model now, edit table did not pick up the new columns (source is a view in warehouse sourced from lakehouse)
- AndyDDCMost Valuable Professional
I should have also stated that you're existing tables will need to be selected, my apologies for not being more clear on that.
As for column-by-column I don't believe you can do that.
- AnonymousNot applicable
Hi joakimfenno ,
Thanks for the reply from AndyDDC .
You can refresh individual tables using the Enhanced Refresh API. This method allows you to specify which tables to refresh.
This is a simple example code:
import sempy.fabric as fabric # Define the dataset and workspace dataset = "YourDatasetName" workspace = "YourWorkspaceName" # Objects to refresh objects_to_refresh = [ {"table": "YourTableName"} ] # Refresh the dataset fabric.refresh_dataset(workspace=workspace, dataset=dataset, objects=objects_to_refresh) # List the refresh requests fabric.list_refresh_requests(dataset=dataset, workspace=workspace)For more information please see:
Refreshing Individual Tables and Partitions With Semantic Link (fabric.guru)
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!- joakimfennoHelper V
Hi
can this be used to add new columns (i.e update the model)?
what is dataset? is that the name of the semantic model?
do you run this within fabric (notebook) or outside?
- AnonymousNot applicable
Hi joakimfenno ,
Thanks to all for their interest in this case.
1. Can this be used to add new columns (i.e. update the model)?
It can be used to refresh a single table, not to update.
2. What is Dataset and is this the name of the semantic model?
Yes.
3. Are you running it inside the fabric (Notebook) or outside?
Run it in a Fabric notebook, like the one shown below.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
- joakimfennoHelper V
Hi again
I still have issues with the GUI refresh
when trying Edit tables - refresh I receive this (screenshot below)- frithjof_vCommunity Champion
Are you using default or custom semantic model?
Did you delete a table column?
You could try to deselect a table from the semantic model, apply, and then reselect it again. If you do this, you could perhaps lose any measures which belongs to that table (I'm not sure) and relationships. But perhaps deselecting a table, apply, and then reselect the table will work.
I believe alternatives to the web GUI is Tabular Editor or Power BI Desktop (Power BI Desktop can't edit direct lake models yet, but it can create and edit Import mode models which offer more customization options).
- joakimfennoHelper V
custom model
I changed a source object from view to tabel (same name)
I tried deslect - select but that did not work
I will try the API for refreshing ythe model but this is frsutrating since some of our users will use the GUI
- AnonymousNot applicable
Hi joakimfenno ,
Thank you for your interest in this case.
Glad to hear you found out what was causing the problem.
frithjof_v's suggestion is a good one, I think you can give feedback on Home (microsoft.com) and attach the link to the reply and I'll give you kudos, as I'm sure others who are concerned about this issue will do the same.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot! - AnonymousNot applicable
Hi joakimfenno ,
Is my follow-up just to ask if the problem has been solved?
If so, can you accept the correct answer as a solution or share your solution to help other members find it faster?
Thank you very much for your cooperation!
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!