Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
03-24-2025 15:17 PM - last edited 03-27-2025 13:13 PM
Download this notebook from: semantic-link-labs/notebooks/Semantic Model Refresh.ipynb at main · microsoft/semantic-link-labs · G...
Check here to see the latest version.
%pip install semantic-link-labs
import sempy.fabric as fabric import sempy_labs as labs dataset = '' # Enter your dataset name workspace = None # Enter your workspace name (if set to None it will use the workspace in which the notebook is running)
labs.refresh_semantic_model(dataset=dataset, workspace=workspace)
The resulting dataframe returns the trace logs capturing the details of the refresh operation
df = labs.refresh_semantic_model(dataset=dataset, workspace=workspace, visualize=True)
labs.refresh_semantic_model(dataset=dataset, workspace=workspace, tables=['Sales', 'Geography'])
labs.refresh_semantic_model(dataset=dataset, workspace=workspace, partitions=["'Sales'[Sales FY20]", "'Sales'[Sales FY21]"])
labs.refresh_semantic_model(dataset=dataset, workspace=workspace, tables=['Geography', 'Calendar'], partitions=["'Sales'[Sales FY20]", "'Sales'[Sales FY21]"])
labs.refresh_semantic_model(dataset=dataset, workspace=workspace, refresh_type='clearValues')
fabric.list_refresh_requests(dataset=dataset, workspace=workspace)
labs.cancel_dataset_refresh(dataset=dataset, workspace=workspace)
# Specify the request_id based on a value from list_refresh_requests labs.cancel_dataset_refresh(dataset=dataset, workspace=workspace, request_id='')
labs.get_semantic_model_refresh_history(dataset=dataset, workspace=workspace)
labs.get_semantic_model_refresh_history(dataset=dataset, workspace=workspace, request_id='')
https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fsemantic-link-labs%2Fblob%2Fmain%2Fnotebooks%2FSemantic%2520Model%2520Refresh.ipynb