Historical data source
A historical data source retrieves history data for objects or groups and displays it as a history graph in the properties pane of the object or group.
Creating a historical data source
Create a historical data source to enable history data to be displayed as a graph.
Prerequisites
-
To create a data source for Smart Points, the required Smart Point Type has been created as described in Creating a Smart Point type.
Do the following:
-
Follow the instructions in Creating a database adapter data source to create a new data source of type Historical Data Source.
-
In the Data Source section, specify the following settings:
-
Name – Enter a name for the data source.
-
Description (optional) – Enter a description for the data source.
-
State – Specify whether the data source is disabled or enabled (default).
- In the Allowed for User Groups section, select the Is Allowed check box of the user groups that should be allowed to see the data that this data source provides.
-
If no groups are selected, only administrators will see the data.
-
If the All Users group is selected, other group selections will be ignored.
-
In the Data Source Configuration section, specify the following settings:
-
Provide data for – Select whether to retrieve the data to objects or Smart Points.
-
Model Objects – the retrieved data will be added to objects that have a specific attribute.
-
Smart Points – the retrieved data will be added to Smart Points of the specified type.
-
-
Parameter Set – Enter the attributes for which the data source is to provide data. There can be multiple attributes in a parameter set, and multiple parameter sets. To add another parameter set, click Add Alternative Parameter Set. This option is visible if you set Provide data for to Model Objects.
-
Smart Point type served – Select the appropriate Smart Point from the list. This option is visible if you set Provide data for to Smart Points.
-
SQL Query – Enter the SQL query to use to retrieve data.
-
Test Key – There will be multiple fields, if multiple parameter keys are used in the query.
-
Click Test Query to test the configuration.
-
In Columns section, specify the following:
-
Time Column – Select which column's values are used as the time value for the graph.
-
Data Column – Select which column's values to use as the data value for the graph.
-
Refresh Automatically– Disabled by default. If set to Enabled, the attributes are refreshed every few seconds. Set the Refresh Interval in seconds. Default is 10 seconds.
-
-
In Graph Options section, specify the following:
-
Is Enum – If set to Yes, and data in the configured data column is enumerated type, the Detected Enum Values table will list the distinct values found in the data column. The fetching and detecting of these values is not done automatically and the Refresh button has to be pressed every time a new type of enum values appear or older ones disappear from the data column.
The data in the Detected Enum Values table can be modified by dragging the values to the desired level. The enum values will be presented in the same order in the resulting graph's y-axis as they are in the table. Meaning that the top most value in the table will be the highest value in the graph and the last value in the table will be the lowest value in the graph.
-
Unit(optional) – You can specify a data unit for the graph.
-
Description(optional) – You can specify a description for the graph.
-
Display Name(optional) – You can specify a custom display name for the graph.
-
Display Category (optional) – You can specify a custom display category for the graph.
-
Is Date Local in DB – If date in database is local, set as Enabled.
-
-
Click Save.
The Adapter Configuration section is read-only.
Selecting attributes
When a user working with a project chooses to see the details of an object in the 3D model, CADMATIC eShare looks up the attributes the object has and makes data queries for those attributes. If a data source has any of these attributes in Parameter Set configuration, then the data source is queried with the values of the attributes from the model object, and the results are shown to the user.
Example: The model contains an object with the attribute Valve Position ID having a value of 12345. A data source has Parameter Set set to Valve Position ID. When the user asks for details of the object, the data source will perform its query with a key value of 12345 and returns attributes if the database contains data for this key.
Multiple parameter sets are useful if there are several attributes that identify items of the same general kind. For example, you might want to use the same data source for equipment and valves if the external database has information for both.