Forum Discussion
Long time to ‘Refresh’ data for a dynamically generated data source
Hi all: Good day! I am developing a dashboard to show different maintenance events info. I pull data from a database table for the events. To get details info for each event, I connect to an API [in api portal] that I can pass an event ‘Id’ and get the details info for that event. I dynamically build a details table for each event ‘Id’. I have set time frame for pulling data from the first source [DB table] starting from January 01 2020 since there are events data for past few years in the DB. But even that while refresh data for the second source[ details table] in my desktop env, it takes almost 1.5 hours for the refresh process.
- Does it get better when we publish the dashboard in the server? [haven’t yet published it in our org server]
- Is there a way to make the refresh process faster? Many thanks in advance. 🙂
7 Replies
- mahoneypatMicrosoft Employee
It seems inefficient to make a web call for each event id. How many events are you doing that for? Is there a different API call you can make that will get all events in one shot (still passing the date paramaters in the call)? Even if there is a row limit, you could still get the data in multiple calls with pagination, and probably save a lot of refresh time.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- AnonymousNot applicable
Hi mahoneypat : Thanks for your response.
The Api definition says it can take a max of 50 ids.
How do I now change my parameter and function to call the api? So far I have a parameter, 'Event Id' that is of type ‘text’ and I pass a sample value. Then I created a function on this parameter that I invoke on to create the details table dynamically.
Do I select List of values to create the parameter? Then how does the function know to send 50 different ids at a time?
Many thanks in advance.
- mahoneypatMicrosoft Employee
Can you show the example syntax they provide when providing more than 1 ID in the call? I assume it is a comma separated list, but please confirm. How many IDs will you need to search on? If >50, you will have to do it in 50 id chunks (which is trickier but doable).
Please also look at the API documentation to see if there is a way to get all the data (e.g., instead of "?ids=..."). Are there other methods to more efficiently get all the data you want (e.g., ?status=). Can you share a link to the API documentation, so I can take a look directly?
Regards,
Pat