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 nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
I built a pipeline that runs a foreach loop that triggers a notebook to refresh Power BI semantic models. It's pretty simple - I pass parameters into the notebook in the first cell and then use the parameters to refresh like this:
import sempy.fabric as fabric
fabric.refresh_dataset(
workspace = WorkspaceName,
dataset = SemanticModel
)
print(WorkspaceName, SemanticModel)
Note that I'm experiencing a service bug where the Semantic Model Refresh activity isn't available (I submitted a ticket).
This refresh appears to be working - the last refresh date is updated and the refresh is logged. However, the reports themselves aren't updated. If I refresh manually, they work. The difference between the two that I see is this.
Scheduled refresh shows:
Via Enhanced Api
# Type Start End Duration Status Error
| 1 | Data | 5/8/2024, 12:42:02 PM | 5/8/2024, 12:42:03 PM | 00:00:00.875 | Completed |
Manual refresh shows:
# Type Start End Duration Status Error
| 1 | Data | 5/8/2024, 3:17:39 PM | 5/8/2024, 3:17:49 PM | 00:00:09.517 | Completed |
| 1 | Query Cache | 5/8/2024, 3:17:49 PM | 5/8/2024, 3:17:49 PM | 00:00:00.203 | Completed |
It appears that the query cache step is necessary to refresh the report visuals, but how do I do this with sempy.fabric?
Solved! Go to Solution.
For what it's worth, I think I figured it out. It was a matter of specifying refresh_type = 'full'
For what it's worth, I think I figured it out. It was a matter of specifying refresh_type = 'full'
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 9 | |
| 5 | |
| 5 |