Datasets in QPR UI
Datasets are used to fetch data from external datasources to present the data in QPR UI. Dataset is a table which contains zero to many rows, and one to many named and ordered columns. Columns in a dataset are in a certain order that is determined by the data coming from the datasource. Dataset columns can be referred either using column name or column index (starting from one from the left). Data in a dataset cells may have one of the following data types: string, integer, decimal, boolean and date. Usually all cells for a certain column contain same type of data. Datatype information comes from the datasource.
Datasets can be defined at any UI element levels (views, panels, repeaters and presentation objects). The defined dataset is available for presentation objects in the same level or any level below it in the UI element's hierarchy.
Mandatory dataset identifier is used to refer to the dataset when the dataset is used by presentation objects. Dataset identifiers must be unique in a single UI element level, which means that you cannot specify two datasets having the same identifier in the same level. Datasets in different levels may have same identifiers and when referring to a dataset, the reference is made always to the nearest dataset when going up in the UI element hierarchy, i.e. the dataset in a lower level overrides a same identifier dataset in the upper level.
For example, if there is a dataset with name "Metrics Query" defined in View Properties, Panel Properties and Repeater Properties, and the "Metrics Query" dataset is used as the datasource for the repeater, the dataset definition done in the Repeater Properties overrides the dataset definitions done in the View and Panel Properties.
When defining a dataset, you need to specify from which datasource the data is queried. In addition, you need to define a query and parameters (depends on the datasource) which determine which kind of data is fetched from the datasource. For example, in QPR Suite you can query different type of QPR Metrics, QPR ProcessDesigner or QPR EnterpriseArchitect objects and in QPR ProcessAnalyzer you can request different analyses. In the dataset query and parameters you can use Variable and Expression tags which enables more dynamic behavior when quering data. When the referenced context variables change, the queries that use the variables are rerun to the datasource and fetched datasets are updated. As a result, presentation objects using those datasets are updated as well.
Following datasources are available:
Datasets can be changed in Dataset tab containing following settings:
- Dataset Identifier: The identifier, which is shown on the list when selecting the datasource for a presentation object. The identifier should be unique within the view, panel, or presentation object where the dataset is defined.
- Datasource: Possible datasources where data can be queried.
- Parameters: You can define a query and possibly parameters that are sent to the web service depending on the used datasource. Please see more information which kind of syntax is used for different datasources from each datasource's page.