8.8
Designing an Aggregated View
Viewpoint enables you create new aggregated views and edit the provided aggregated views or aggregated views you have created. This topic identifies how aggregated view components are organized and the resources available when designing an aggregated view.
See 8.5 Creating an Aggregated View for instructions on how to create an aggregated view.
See 8.7 Editing an Aggregated View for instructions on how to edit an aggregated view.
In this topic:
- 8.8.1 Aggregated View Information
- 8.8.2 Aggregated View Permissions
- 8.8.3 Using the Pipeline Designer
8.8.1 Aggregated View Information
There are two fields at the top of the Create and Edit Aggregated View pages where you can enter identifying information about the aggregated view you are designing:
Name – The name of the aggregated view. This is a plain text field, which may contain uppercase or lowercase letters, numbers, spaces, or special characters.
Description – A description of the aggregated view. May also be used to provide instructions to report designers on how to use the aggregated view to create reports.
8.8.2 Aggregated View Permissions
You can restrict who has access to your aggregated view. This is done using the Permissions area at the top right of the page.
The following image is an example of the Permissions area.
Click to enlarge |
Using this area you can restrict access by:
- Users. In the Users field, type the IDs of the users. Viewpoint will check if the users you added are valid; that is, has a valid operating system account. If the user is valid, the user name turns green; otherwise it turns red. Use "ALL" to remove restrictions.
- Group associations. In the Groups field, type the IDs of the groups. Viewpoint will check if the groups you added are valid; that is, has a valid operating system account. If the group is valid, the group ID turns green; otherwise it turns red. Use "ALL" to remove restrictions.
- Account associations. In the Accounts field, select from the available accounts listed in the drop-down. Leave blank to remove restrictions.
8.8.3 Using the Pipeline Designer
When you create a new aggregated view, the Pipeline Designer for the view appears as shown below:
Click to enlarge |
The available node types are represented by icons on the left side of the page (source, filter, etc.). The current pipeline design is represented by icons placed in the design area on the right side of the pipeline designer. To increase the size of the design area, click and drag the icon on the lower right corner of the design area.
An aggregated view consists of a connected series of nodes (the "pipeline") that operate on data from a data source to produce a database layout. The Pipeline Designer places nodes representing the data source and database layout for you in a new pipeline. To complete the design of your aggregated view pipeline, place and connect the nodes that operate of the data from the data source to produce your desired database layout.
There are a few basic steps in placing a node in a pipeline:
- Drag a node from the left side of the page and drop it in the design area.
- Connect the node to the previous node in the pipeline.
- Edit the node's properties.
- Add a comment describing the node (optional).
- Click Apply to apply the properties to the node.
A finished aggregated view pipeline is shown below:
Click to enlarge |
8.8.3.A Pipeline Data
Data flowing through the aggregated view pipeline is represented using JavaScript Object Notation (JSON). JSON is a standard format for data interchange, designed to be easily readable.
The data flowing through a pipeline consists of a stream of timestamped messages:
{ "msg": { //message data }, "ts": <timestamp of the message> }
The structure and content of the data portion of each message depends on whether the data source is a job, reservation, cluster sample, or job state journal stream.
You can view the structure of the data stream at any point in a pipeline design by clicking on a node, then clicking the Inpsect Incoming JSON structure link below the design area. For example, in the pipeline design shown above, if you click the Filter node, then click Inspect Incoming JSON structure, you will see the structure of the stream of job messages passed from the job data source to the Filter node.
Click to enlarge |
8.8.3.B Pipeline Nodes
The nodes in a pipeline operate on and transform the incoming data stream. A description of the operation of each node type is given in the table below.
Node Type | Description | Property | Property Values | Property Value Description |
---|---|---|---|---|
Source | One of the registered sources of messages | Source Stream | job | Job data |
reservation | Resource reservation records | |||
clusterSample | How cluster resources are allocated | |||
Filter | Removes messages from the stream that do not meet specified criteria | Match Type | Match All (And) | Data must meet all criteria to continue through the pipeline |
Match Any (Or) | Data may meet any criterion to continue through the pipeline | |||
Field | Message field | |||
Operator | Operator used to compare Field to Value | |||
Type | Data type of Value | |||
Value | Value being compared to Field | |||
Group and Reduce |
Accumulates the set of messages having the same key value and then reduces the set to a single message by means of an aggregate function. A Group and Reduce node is a single message with the following output JSON: { "msg": { "key": <key by which grouping is performed> "value": <result of the aggregate function> }, "ts": <timestamp of the message> } |
Key to Group-by | Key in message record to group records by | |
Aggregation | Count, sum, min, max | Aggregation function (count of records in group, sum of selected field, field minimum, field maximum | ||
Field Type to Aggregate | Field value, Field value to integer, field value to double | Use field value or convert to integer or double | ||
Field to Aggregate | Name of message field to aggregate using the aggregation function | |||
Distinct | Removes duplicate messages within a given time window. | Key field | Field to remove duplicate values | |
Window | Time window (seconds) | |||
Fork | Splits the input stream into arbitrary number of outgoing streams. Every message from the incoming stream will appear in every forked output stream. | None | ||
Flatten |
Unwraps a collection within a single message into the stream of messages. //JSON before flattening where key="msg.arr", type=integer, value=1 { "msg": { "arr": ["one", "two"] }, "ts": 123 } //JSON after flattening { "msg": { "key": "one", "value": 1 }, "ts": 123 }, { "msg": { "key": "two", "value": 1 }, "ts": 123 } |
Key Field | An array or key-value object (map) to be unwrapped | |
Value Type | Boolean, double, integer, string, field value, field value to integer, field value to double | Data type to be associated with each extracted collection item | ||
Value | Value to be associated with the extracted collection item | |||
Join | Takes two streams as the input, accumulates them in a time window, combines the messages from different streams together and sends the joined messages into the output stream. | Window | Time window in which to accumulate messages (seconds) | |
Join Type | One to one | Takes the whole structure of a message from left stream, adds a new field, places a matching messages from the right stream under that field. | ||
One to many | Takes the whole structure of a message from left stream, adds a new field, places a list of all matching messages from the right stream under that field. | One to many | ||
Left Key | Field from the left stream used for matching messages from right stream. | |||
Right Key | Field from the right stream used for matching messages from the left stream. | |||
State | Perform calculations based on indirect connections between different messages in the single stream. | Key Field | Field by which the state identifier can be extracted | |
Timeout | Timeout of the state lifetime (seconds). If no new messages appear that relate to the given key before timeout, the state for the given key is removed automatically. | |||
Source Field | ||||
Target Field Name | ||||
Transform | Defines a single structural change in the incoming JSON. Examples: add a JSON field with a constant value, referencing a value from another field, or the result of a DateToTimestamp or string/array length function. | Target Field | The field to be written to. If new, the new field is added to the JSON. If an existing field, the field is rewritten. May be null if New Value Kind is function, in which case the function result is saved in the origin field. | |
Field Description | Description of the target field. | |||
New Value Kind | Constant | Boolean, double, integer, or string value | ||
Union | Combines two input streams to form a single output stream. All messages from the input streams appear in the output stream unchanged and ordered by timestamp. | None | ||
DB Layout | Defines the layout of the destination data stream that will be available to reports based on the aggregated view. | Persistence Granularity | Minute, Hour, Day, Month, Year | Data granularities to be included in the destination data stream. |
Column Map | Maps fields in the incoming JSON structure to columns in the destination data stream. |
8.8.3.C Saving an Aggregated View Design
When you have finished designing your aggregated view, click SAVE AND CLOSE to save the aggregated view and close the page or click SAVE AND RUN to save and view the aggregated view.
Related Topics