Virtual datasets
What they are¶
Virtual datasets contain logical definitions which allow you to combine two or more physical datasets, creating relationships between their fields. The fields of virtual datasets are therefore fields called by physical datasets, or fields calculated according to formulas defined by the user.
| Field type | Description |
|---|---|
| Field based on fields of a physical dataset | Field defined on the basis of fields extracted from one or several physical datasets. |
| Calculated field | Field based on a formula that the system solves at runtime. Formulas for calculating values at runtime can also call physical dataset fields and therefore allow you to work on complex values. |
Virtual datasets allow you to combine the values of several datasets and perform calculations without running data processing. The values returned by a virtual dataset are calculated at runtime and are not saved in the database. They can be used in navigation mode by the reporting engine, as input in a DTP operation, or as data sources when loading via Quick Data Loader.
Associations between the fields of datasets¶
Virtual datasets are defined by relationships between physical datasets. Only online physical datasets are available to be selected. Offline datasets are not available, as it is assumed that they are undergoing changes.
An association is defined by specifying the two physical datasets and the relative fields, which must be related and combined (Join). The virtual dataset therefore only returns the records in which the related fields have matching values. For this reason, at least one relationship between the fields of the two Datasets must be defined.
Using the Insert all records option, which can be selected on each of the two related physical Datasets, it is also possible to include, in the set of records returned by the Virtual Dataset, records of the Physical Dataset in which one of the related fields is empty (Left outer join, Right outer join, Full outer join).
Although it is not possible to relate a physical dataset to itself, or select the same Dataset in the two fields of the Relationship, it is still possible not to select a second dataset. Thus, the fields are calculated on the basis of the fields of the only selected physical dataset and it is not possible to add further relationships to other datasets.
Note: it is not possible to use other virtual datasets for the definition of a virtual dataset.
When inserting subsequent Dataset relationships, if one of the two datasets of the new relationship is contained in the previous relationships, this is equivalent to relating the second pair of datasets to the result of the previous relationships.
Example
Dataset A join Dataset B
Dataset B join Dataset C
It is solved by the system as:
(Dataset A join Dataset B) join Dataset C
The same result is obtained with the following 3 pairs of relationships:
| Dataset A join Dataset B | Dataset A join Dataset B | Dataset A join Dataset B |
| Dataset A join Dataset C | Dataset C join Dataset B | Dataset C join Dataset A |