Forum Discussion
Refreshing dataset
- 7 months ago
Hi mp390988 ,
FBergamaschi is completely right: "Event-Based" triggers are the best practice, whereas "Time-Based" schedules (like your 5 PM refresh) are prone to the exact race condition you described.
However, running a PowerShell script is just one way to execute this. Depending on your infrastructure, here are the 3 Industry Standard Patterns to solve this "Dependency Chaining" problem:
1. The Enterprise Method: Azure Data Factory / Synapse Pipelines If you are using a cloud ETL tool (like ADF) to load your database, this is the "Gold Standard."
How: Add a final activity to your pipeline after the "Load Data" activity succeeds.
Activity: Use the native "Power BI Semantic Model Refresh" activity (preview) or a Web Activity calling the Power BI REST API.
Benefit: The dataset refreshes exactly 1 second after the data load finishes. Zero gaps.
2. The On-Premises SQL Method: SQL Server Agent Jobs If your database is an on-prem SQL Server, you are likely using a SQL Agent Job to run the stored procedures that update the data.
How: Add a final Job Step to that existing job.
Action: This step runs the PowerShell script provided by @FBergamaschi.
Benefit: The refresh is tightly coupled to the database update success. If the DB update fails, the refresh never triggers (preventing empty reports).
3. The Low-Code Method: Power Automate If you don't have access to ADF or the SQL Server Agent, Power Automate is the most flexible bridge.
How: Create a Flow with the "Refresh a dataset" action.
Trigger:
Option A: If your database supports it, use a "When a row is inserted" trigger (have your DB write to a 'Log' table when it finishes).
Option B (Webhook): Create the flow with an "When an HTTP request is received" trigger. Have your database script or ETL tool send a simple 'ping' (POST request) to this URL when it finishes.
Summary: Stop guessing the time (5 PM). Make the completion of the database job the trigger for the Power BI job.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes. - 7 months ago
Hi mp390988,
Let me add my contribution in this discussion:
✅ Best Practices to Solve This
Option 1: Use Power Automate or Fabric Dataflows
- Instead of relying on a fixed schedule, trigger the Power BI dataset refresh after the upstream process completes.
- For example:
- When your ETL or database job finishes, send a webhook or event to Power Automate.
- Power Automate then calls the Power BI REST API to refresh the dataset.
- This ensures the refresh happens only when the data is ready.
Option 2: Use Data Pipelines in Microsoft Fabric
- If you are using Fabric, you can orchestrate the entire process in a Data Pipeline:
- Step 1: Run your precursor jobs (SQL, Lakehouse, etc.).
- Step 2: Add a Power BI Refresh activity at the end of the pipeline.
- This gives full control and avoids timing conflicts.
If this response was helpful in any way, I’d gladly accept a 👍much like the joy of seeing a DAX measure work first time without needing another FILTER.
Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop 🌀.
- 7 months ago
Hi mp390988,
Thank you for posting your query in the Microsoft Fabric Community Forum.
While Snowflake itself doesn’t directly trigger a Power BI semantic model refresh, you can still follow the same event-based approach by calling the Power BI REST API at the end of your Snowflake pipeline. Most Snowflake environments use tools like Snowflake Tasks, dbt Cloud, Airflow, Azure Data Factory or even a simple webhook to Power Automate to run a final step that triggers the dataset refresh once the data load completes.
This ensures your semantic model always refreshes only after Snowflake has finished processing.
Thanks, Zanqueta, cengizhanarslan,FBergamaschi & burakkaragoz for sharing valuable insights.Best regards,
Ganesh Singamshetty.
thank you all for your answers! Much appreciated.
At my company, they have decided to go with Snowflake instead of Fabric, so does anyone know if there is a functionality in Snowflake that will refresh the semantic model at the end of the pipeline?
Thanks
- v-ssriganesh7 months agoCommunity Support
Hi mp390988,
Thank you for posting your query in the Microsoft Fabric Community Forum.
While Snowflake itself doesn’t directly trigger a Power BI semantic model refresh, you can still follow the same event-based approach by calling the Power BI REST API at the end of your Snowflake pipeline. Most Snowflake environments use tools like Snowflake Tasks, dbt Cloud, Airflow, Azure Data Factory or even a simple webhook to Power Automate to run a final step that triggers the dataset refresh once the data load completes.
This ensures your semantic model always refreshes only after Snowflake has finished processing.
Thanks, Zanqueta, cengizhanarslan,FBergamaschi & burakkaragoz for sharing valuable insights.Best regards,
Ganesh Singamshetty.