Using CDS Data Sources


Using a Common Data Service (CDS) type data source, data from EnOS Common Data Service can be displayed on the page.

Prerequisites


Before use, ensure the following:

  • The asset has been connected and mounted to an asset tree, and the asset tree already has the auth_unit:ture and EnosCDS:true tags.

  • Assets have been synchronized in the management background and synchronized to the application portal.

  • Mounted the assets to the organization tree and assigned the organization structure to DTV and CDS.

  • The current account already has permission to view the organizational structure and assets.

  • The business object types, business indicators, attributes, measurement points, etc. that need to be used have been created in CDS.

Steps


  1. In DTV Center > Data Sources, enable the required data source.

  2. Open any page in DTV Center > Dashboard/Single Page App.

  3. Select the Edit button of any widget to open the widget configuration panel.

  4. Follow the steps in Configuring Widget Data to configure the CDS data source in the widget.

  5. Refer to the following content to configure the request parameters of the data source.

Timeseries Data Source


Timeseries data sources are time series data of assets associated with the EnOS model over a period of time. In the Timeseries data source, the default structure and scope of the data are defined by the model. By default, the return structure of the Realtime data source is the asset time series data within the user permissions associated with the model.

Request parameters for the Timeseries data source include:

Name

Key

Default Value

Description

Automatically obtain assets

autoData

false

Whether to automatically obtain assets that the current user has permissions to. If True is selected, the assets of the corresponding model that the user has permissions to will automatically obtain.

Query type

Query type

Determined based on the previous relationship between category and asset ID.

Sibling relationship: The selected asset is an asset under the selected category, that is, only the asset data of the selected asset is returned.

Hierarchical relationship: The selected category is the asset category of the assets under the selected asset, that is, the asset data of all assets under the selected asset is returned.

Grouping: The selected category is the asset category of the selected asset, that is, the asset data aggregated according to the asset grouping is returned.

Accumulation granularity

accumulate

None

Real-time data accumulation thickness. For example: summarize data by different time intervals.

Asset ID

mdmId

None

Select the asset, which corresponds to the asset ID in the management console.

Start Time

startTime

None

Set the starting date and time for querying data.

End Time

endTime

None

Set the end date and time of query data.

Aggregation type

aggregation

None

Time series data aggregation method, for example: calculating the average value of time series data within a time period.

Aggregation granularity

interval

None

Aggregation thickness of time series data, for example: aggregate data every 5 minutes.

Dimensions

dimension

None

Dimensions other than assets and time, for example: device model, device manufacturer.

This parameter is used for aggregate query or filtering, and multiple dimensions are separated by commas.

The number of dimensions specified in a single query shall not exceed 10.

Dimension ID >>

Whether to display asset data

rawAttribute

None

When the measurement point does not exist in an asset, other data of the asset will still be displayed.

Placeholder

preserveIndex

For times when there is no data, empty data values ​​are displayed as placeholders.

Interpolation

autoInterpolate

For times without data, interpolate with the same measuring point data as the previous time.

Realtime Data Source


Realtime data sources are real-time data for assets associated with the EnOS model. In Realtime data sources, the default structure and scope of data are defined by the model. By default, the return structure of Realtime data sources is the real-time data of assets within the user permissions associated with the model.

Request parameters for Realtime data sources include:

Name

Key

Default Value

Description

Automatically obtain assets

autoData

false

Whether to automatically obtain assets that the current user has permissions to. If True is selected, the assets of the corresponding model that the user has permissions to will automatically obtain.

Query type

Query type

Determined based on the previous relationship between category and asset ID.

Sibling relationship: The selected asset is an asset under the selected category, that is, only the asset data of the selected asset is returned.

Hierarchical relationship: The selected category is the asset category of the assets under the selected asset, that is, all data of all assets under the selected asset are returned.

Grouping: The selected category is the asset category of the selected asset, that is, the asset data aggregated according to the asset grouping is returned.

Accumulation granularity

accumulate

None

Real-time data accumulation granularity, for example: summarize data at different time intervals.

Asset ID

mdmId

None

Select the asset, which is the asset ID corresponding to the management console.

Dimensions

dimension

None

Dimensions other than assets and time, for example: device model, device manufacturer.

This parameter is used for aggregate query or filtering, and multiple dimensions are separated by commas.

The number of dimensions specified in a single query shall not exceed 10.

Dimension ID >>

Whether to display asset data

rawAttribute

None

When the measurement point does not exist in an asset, other data of the asset will still be displayed.

Record Data Source


The Record data source connects the factual data of assets, such as alarms, control requests, etc. In the Record data source, the default structure and scope of the data is defined by the table. By default, the return structure of the Record data source is the fact data of the assets within the user permissions associated with the model.

The request parameters of the Record data source include:

Name

Key

Default Value

Description

Starting page number

pageNo

After paging the data according to the data size, request the starting page number of the data.

Data volume

pageSize

The number of data items per page.

Alarm Data Source


Alarm data source connects the alarm data of the asset. In the Record data source, the default structure and scope of the data are defined by Alarm. By default, the return structure of the Record data source is the alarm data of assets within the user permissions associated with the model.

The request parameters of the Alarm data source include:

Name

Key

Default Value

Description

Asset ID

mdmId

None

Select the asset, which is the asset ID corresponding to the management console.

Asset type

scope

Get the asset scope of the alarm

Station: The selected asset is the station, and all alarms under the station will be queried.

Equipment: The selected asset is equipment, and all alarms under the equipment will be queried.

Start Time

startTime

None

Set the starting date and time for querying data.

End Time

endTime

None

Set the end date and time of query data.

Alarm parent type ID

parentTypeIds

None

Alarm parent type ID.

Alert type ID

alertTypeIds

None

Alert type ID.

Device type ID

mdmTypeIds

None

Device type ID.

Alert ID

alertIds

None

Alert ID.

active

active

Whether to filter active alarms.

Topology Data Source


The Alarm data source contains hierarchy (topology) information for the assets associated with the EnOS model. The default structure and scope of the data are defined by Alert. By default, the return structure of the Record data source is the topological data of the assets within the user permissions associated with the model.

name

key

default value

description

Asset ID

mdmId

None

Select the asset, which is the asset ID corresponding to the management console.

TopologyId

topologyId

The ID of the organization tree configured in CDS.

Whether to cut

ifCut

None

Whether to cut the tree according to the selected model.

Accumulation granularity

accumulate

None

Real-time data accumulation granularity, for example: summarize data at different time intervals.

Asset ID

mdmId

None

Select the asset, which is the asset ID corresponding to the management console.

Dimensions

dimension

None

Dimensions other than assets and time, for example: device model, device manufacturer.

This parameter is used for aggregate query or filtering, and multiple dimensions are separated by commas.

The number of dimensions specified in a single query cannot exceed 10.

Dimension ID >>

Whether to display asset data

rawAttribute

None

When the measurement point does not exist in an asset, other data of the asset will still be displayed.