Forum Discussion
Python crashes only after Transforming data + alternative for loading data when viewing mobile app?
Hi BeautifulDash ,
Please try below steps:
1. API Call Optimization: Although you mentioned having rate limiters within your functions, it's worth reviewing the script to ensure that it's optimized for minimal API calls, especially if the script is executed multiple times for any reason. Techniques such as caching responses or using bulk API endpoints (if available) can reduce the number of calls.
2. Error Handling in Script: Implement robust error handling within your Python script to gracefully handle rate limit errors. This can include retry logic with exponential backoff or logging to help diagnose the issue further.
3. Improving Data Loading Times and Mobile Reporting
To address the issue of data loading times and building a mobile report for checking electricity consumption, consider the following:
4. Incremental Refresh: Utilize Power BI's Incremental Refresh policies to reduce the amount of data loaded with each refresh. This can significantly improve performance and reduce the load on your API.
5. Storing Data: Consider storing your data in a database or a cloud storage solution after the initial API call. This way, Power BI can connect to this data source instead of directly calling the API each time. This approach can also facilitate building a mobile report, as the data would be readily available for Power BI to consume.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.