Tracking (optional)
The Tracking feature is used to record the changes in the Data Source database between two refresh tasks, and work only on the differences at the run.
To activate this feature, the following must be defined:
- For the Trigger Tracking type:
- Tracking key: Tables and Fields in the Data Source database to track. The Table has to be used in the Data Source definition but the Field does not have to be selected for a Dimension or Measure.
- Tracking mappings: Association between the Tracking and the Table field.
- The trigger tracking type is not available for Snowflake.
- For the Date Tracking type:
- Primary keys: this feature is used to identify the records that will be updated (all records that share this Primary key will be updated if one of the records with this same Primary Key has a more recent date than the one from the last update).
- If we take as example invoice header, it will be the invoice number whereas the invoice detail will be the invoice number and the invoice line. If we just put the invoice number as Primary Key, all lines will be updated even if only one has really changed.
- Date fields to track: refers to the fields which contain the update date. We can identify several fields which could come from different tables and if one of them is more recent than the last update, this record will be taken into account and the update will be based on the Primary Key.
- As example, we can set it to the field DateLastChange of invoiceHeader and InvoiceDetail, if ever only the one of InvoiceHeader or InvoiceDetail has changed, the update will be done correctly.
If one Data Source of the Cube does not have Tracking while the others do, it will reverse all the lines affected by this Data Source and re-calculate the results in the Cube, based on the Cube History Table.
According to the size of all the Data Sources with and without Tracking, it might be faster to load all the task than perform a refresh.
Add a Tracking
- In the Cubes list, select a Cube.
- In the Navigation Bar, click on the
Navigation drop-down list and select
Data Sources.
NoteData Sources are not accessible to Cubes with the In Production checkbox ticked.
- In the Data Sources list, select the Data Source you want to edit.
- In the navigation bar, click on
Data Source and select
Edit Data Source.
- Right-click on the middle of the screen and select
Tracking.
NoteYou can also use the Navigation Bar and click on
General to get access to this option.
- Select if you want a Tracking by date or by trigger.
If you select Date, follow the steps below. If not, please go directly to the next section.
- In the Primary keys section, click on
Add key.
- Use the drop-downs to select the Tables and the corresponding Fields.
- In the Date fields to track section, click on
Add Tracking.
- In the Data Type drop-down list, select Date or DateTime according to your need.
- Click on
to add a calculation.
- Click on Confirm to finish.
If you select Trigger, follow the steps below:
- In the Tracking Keys section, click on
Add Key.
- Use the drop-downs to select the Tables and the corresponding Fields.
- Click on
Add Tracking to define the mapping.
NoteBecause the Data Source could be designed with SQL Views which could not have Triggers ON, this is necessary in order to match the Key of the Tracking with Field from the Data Source.