The Table To History component is designed to resolve a BOrd value to a BITable and then write the data from the table to one or more Niagara histories. The first column of the BITable result must be a timestamp of the BAbsTime type, and there must be one or more additional value columns that could be Boolean, Numeric, Enum or String types. If one of the columns is a BStatus type it is used to populate the status of the trend record. If one of the columns is a BTrendFlags type it is used to populate the trend flags of the trend record.
A unique history is generated for each value column in the result set. The value column name or alias is used to specify the history ID.
The component is located in the vykonProTransform palette.
Ord - The BOrd value that is resolved when the execute action is invoked. This would typically be a BQL query against a history or resolving a series transform graph. However, it can be any BOrd value which resolves to a BITable result which has the first column as a BAbsTime value and one or more additional value columns.
Last Execution Time - The timestamp at which the execute action was last invoked.
Fault Cause - String property which displays any faults related to invoking the execute action.
Status - Status of the component.
History Config - Used to configure the capacity and full policy of the generated histories.
Interval - Used to configure the expected interval between records in the BITable result.
Delete Records On Split - Boolean property used to configure the behavior when generating the history data results in a history split. If the property is true and invocation of the execute action results in a history split, the original history data is deleted and the new data is written to the history. If the property is false, the original history data is maintained by appending cfgX to the history ID.
Delete Records On Execute - Boolean property used to configure the behavior when generating the history data. If the property is true, the existing history records are deleted prior to appending any new records.
History Device Name - BFormat property used to resolve the device name portion of the history ID. The default %componentSpace.rootComponent.stationName% resolves the name of the station which the component is located.
A series transform graph is configured with two history source nodes. The buildingKw node is configured for an electric demand history and the buildingKwh nodes is configured for an electric consumption history.
The graph is configured with a composite node to combine the two history sources into a single data set and a rollup node to aggregate 15 minute interval records to daily records. The Kwh values are aggregated using the sum function while the Kw values are aggregated using the average function. Note, the schema names will be used as the history IDs in the generated histories.
The Ord property of the component is configured to resolve the transform graph.
station:|slot:/Folder1/TransformGraph|transform:slot:/Folder1/TransformGraph
The interval property is set to ""24 hours and the History Device Name property is set to a static string value of "Analytics".
When the execute action is invoked, the component resolves the transform graph and stores the results for each value column in the BITable result set as an individual history. Note, the history ID was specified using the History Device Name property and the schema name for each value column.