How to minimize the frequency of a Scheduled Updates job without compromising on fresh data

How to minimize the frequency of a Scheduled Updates job without compromising on fresh data

book

Article ID: KB0079240

calendar_today

Updated On:

Products Versions
Spotfire Web Player All Versions

Description

When new data is added to your data source every 30 minutes (for example), and reloading all data takes more than 30 minutes, how frequently should you update the report in Scheduled Updates? Even if it is run every couple of hours, you are consuming a lot of machine resources to continually reload all data, and in a worst case scenario the data is 2 hours old. The ideal scenario is to maintain the older data which has not changed and instead only load the new data. Scheduled Updates currently does not directly support incremental updates, but this article explains a workaround solution.

Issue/Introduction

How to minimize the frequency of a Scheduled Updates job without compromising on fresh data

Resolution

High level Steps:
  1. Spotfire does not have an incremental refresh/reload feature. Every time you run a Scheduled Updates job, it will always fetch everything. A workaround is to split your data into two parts:
    • Part 1: Everything before today.
    • Part 2: Today's data.
  2. Run Scheduled Updates once a day to ensure that you always have all the data before today.
  3. Exclude Part 2 from the Scheduled Updates job, so it fetches fresh data every time. This way you avoid loading entire datasets multiple times in a day, and at the same time, you get the latest data every time you load the report.
Detailed Steps:
  1. Create an information link with a filter on date, where date < today. Named for example IL1.
    Example SQL for the information link should look similar to the one below:
    select * from table where date < today
  2. Create an information link with a filter on date, where date = today. Named for example IL2.
    Example SQL for the information link should look similar to the one below:
    select * from table where date = today
  3. Add a new data table from IL1.
  4. Add rows to this data table from IL2.
  5. Go to data table properties and exclude the second information link (IL2) from Schedule Updates.
  • Edit > Data Table Properties > Schedule Updates > Reload the following data for each User
Note: You can change the splitting (<today, today) depending on the total size of the data and how frequently you get new data.

Now you can add that report to Scheduled Updates so that it is cached, and only the data from IL2 will be updated when users access the report.
 

Additional Information

Doc: Creating a scheduled update by using Spotfire Server