This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Your file has been submitted successfully. We’re processing it now - please check back in a few minutes to view your report.
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