Refresh data in Dundas BI
This article describes the different ways in which a data cube or a data visualization can be refreshed to retrieve the latest changes in the underlying data source. This is useful when the data source gets updated regularly and the changes in data need to be reflected on the dashboard.
2. Refreshing a Data Cube
By default, data cubes and other data displayed in Dundas BI are not warehoused or stored in-memory and will always retrieve data directly from the data source. However, changes to the structure on which a Select transform is based, such as editing or rediscovering a data connector, require a manual refresh of the transform. Simply right-click on the Select transform node and select Refresh or use the Refresh icon from the toolbar.
If the underlying data cube's storage type has been set to warehouse or in-memory, then it can be refreshed by either scheduling the re-build or by triggering the re-build via a script from the dashboard.
2.1. Schedule Data Warehouse and In-Memory Build
A data cube that is cached in warehouse or internal memory can be configured to refresh itself after an interval. After the data cube is checked in, you can Schedule the cube build by specifying a schedule rule. every time the scheduler is run, the data cube is rebuilt and the dashboards displaying its data will reflect the updates the next time they load.
After you build the warehouse, when you go to view a dashboard, it is possible that you will be seeing old data that was there before the warehouse was last built. This is because of data result caching which is not cleared when the warehouse is built.
You can disable data result caching in this case from Admin | Setup | Config by changing the Result Cache Size setting to -1.
2.2. Rebuild Data Cube using Script
If the data cube is warehoused or stored in-memory, then you can trigger the data cube build using script on the dashboard. This script can be added to the Click event of a Button component.
//get the data cube service var dataCubeService = this.getService("DataCubeService"); //build the data cube in warehouse using the data cube id //Parameter 'true' if the data cube is to be built in-memory //'false' if the data cube is built in the warehouse dataCubeService.buildWarehouse("4b22e502-6dac-4227-bc93-1cdb8491dec6",true);
The ID of the data cube can be obtained by right clicking on the data cube from the Explore Panel, select Properties and copy paste the ID.
3. Refreshing a Data Visualization
A data visualization can be refreshed manually or periodically.
3.1. Auto Refresh Interval
Every visualization has the property Data Auto Refresh Interval. Using this property, you can specify how often a visualization retrieves new data from the cache or the data source.
You can find this property on the Main tab of the visualization's properties.
3.2. Bypass Data Cache
If you want to see real-time data on the dashboard, you can bypass the data cache after setting up a Data Auto Refresh Interval. This means that the data will be retrieved on regular intervals from the data source directly and not from the cache.
This option can be selected for each data visualization from its Data Binding Panel.
Right click on the visualization to open the Data Binding Panel.
Click on the Edit icon. From Configure The Metric Set Binding panel, check the Bypass Data Cache checkbox.
3.3. Manual Refresh
In View mode, the data visualization can be refreshed manually whenever you want to see the latest data.
To do this, right click on the visualization to bring up the Context Menu.
Select Data Tools and click on Refresh Data.
4. Bypass the Hierarchy Cache
// Set the bypassHierarchyCache property to true. // This will cause the hierarchy cache to never be used. parameterHierarchy1.control.bypassHierarchyCache = true;
5. See Also