Composite Data Source

Last modified on 2022/05/28 10:52

Apps - Datasource - Composite icon.png This type of data source belongs to the Standard category in the data source library. It enables you to merge information from several data sources. The link is created through a common column in different data sources.

Notes

     Open url.png  see General remarks on data sources

  • As a general rule, the Composite data source contains one Dimension column corresponding to the reference column. There are one or more Measure columns corresponding to columns from the different data sources associated with it -  Open url.png  see Standard data source structure
  • All of the data sources associated with the Composite data source must have the same grouping criteria.
  • All of the rows for each element in the Composite data source are processed when merged. If reference values are missing for an element, the row is still generated in the Composite data source with unspecified values for this element. See the example.
  • Each modification made to one of the elements in the Composite data source will automatically update its data.
  • If you delete an element in the Composite data source, you only delete the association. The original data source will still remain available in the data source library.
  • The Composite data source inherits the automatic refreshment interval of each of its elements (Auto Refresh property).
  • You can rename the columns of each element in the Composite data source. The name will not be modified in the original data source.

Example

You want to build a Composite data source that groups the number of incidents (data source 1) and the number of equipment (data source 2) by location (reference column).

  • Data source 1: Data related to the number of incidents by location.
  • Data source 2: Data related to the number of equipment by location.
  • Composite data source:
    • Reference value San Francisco from data source 1 does not exist in data source 2 ==> one row is generated in the Composite data source with an unspecified value for the number of equipment.
    • Reference values Cambridge and Dallas from data source 2 do not exist in data source 1 ==> 2 rows are generated in the Composite data source with unspecified values for the number of incidents.
Data source 1 Data source 2 Data source Composite
EVApps - datasource Composite - Example Datasource 1.png EVApps - datasource Composite - Example Datasource 2.png EVApps - datasource Composite - Example Datasource Composite.png
Download Zip icon.png Download Example (CSV files)

List of properties

Content

Name: List of elements associated with the Composite data source.

  • The drop-down list displays all of the data sources available in the app library that are not yet associated with the Composite data source.
  • Click on Apps - Delete icon.png to delete the association of one of the elements with the Composite data source.

Add Data Source: Used to add a new element to the Composite data source.

Customize Labels: Used to select the reference column that creates the link between the different elements in the Composite data source. Also enables you to rename the columns of each element-  Open url.png  see Procedure

Preview

Configure Field Types: Used to open the field editor that enables you to select data source fields and specify the type of each field, e.g. date, integer, etc. when this is not automatically detected.

  • The Apps - datasources Properties - Preview button.png button below the property shows the number of rows (max. 15) and columns extracted. Click to open the editor.
  • The button will display No data available as long as you have not selected any of the mandatory elements for the data source.
  • In edit mode, only the first 15 data source records are displayed.
  • In execute mode, all of the data source records are displayed.
  • Data in static data sources comes from the last file upload.
  • Data in dynamic data sources is refreshed when you open the app in edit mode.
AutoRefresh

Auto Refresh (Note: Only for dynamic data sources): Used to indicate the automatic refreshment interval for data from the data source in hours/minutes.

  • Data is automatically refreshed each time the app is run and each time the page is redisplayed, regardless of whether it is in execute mode or edit mode.

Caution: The updating of data requires additional activity on the Service Apps platform.

Best Practice icon.png  

  • You should define an automatic refreshment interval only if the app is required to constantly display real-time data for long periods of time on screen.

example  View dashboard data

  •  You should not specify an automatic refreshment interval if the app is only used for displaying a snapshot of data.

example  Display a portal where catalogs can be consulted

SelectFirstRowAsCurrentRecord

Select First Row As Current Record: Used to indicate if the first record of the data source, when displayed in widgets, is selected by default (box is checked) or not (box is not checked).

NoDataMessage

No Data Message: This message is displayed when the data source does not contain any data.

  • Enter the code directly in the field or click Apps - Edit Html icon.png to open the text editor

Procedure: How to define a Composite data source

1. Create all of the elements you want to use in the Composite data source in the data source library.

2. Click on Apps - Add datasource icon.png in the Objects pane, and then click Composite Data Source.

The Properties Inspector will appear.

3. Select the first element of the Composite data source from the Name drop-down list.

4. Click Add Data Source. A new record is added. Select the element you want from the Name drop-down list.

5. Repeat the procedure to add other elements to the Composite data source.

Note: You can delete the association of one of the elements by clicking on Apps - Delete icon.png.

6. Click Customize Labels.

All of the columns for each element in the Composite data source will appear.
         EVApps - datasource Composite - Composite Setup.png

  • For each element, select the reference column that will create the link with the other elements and click OK.
  • To reset the reference columns for each element, click Reset Keys. The checkboxes for all of the columns will be unselected.
  • You can rename the columns of each element. Enter the new name in the corresponding field. To cancel and reuse the original names, click Reset Labels.

7. Click Preview to see the result of the setting you specified.

Tags:
Powered by XWiki © EasyVista 2022