0

Managing the Historian (version 23)

A DataSet is a logical grouping of tags and is the basic building block of the Historian database. A DataSet houses the HDB files (historic database files) that contain tags and all the TVQ updates and properties for those tags. 

You may view all your DataSets by opening the Canary Admin application and then selecting the Historian tile. The first screen of the Historian user interface displays every DataSet. 

In the upper left-hand corner you can view information about the Canary Historian.

DataSet Count The current number of DataSets within the historian
Licensed Tags How many tags are currently licensed within the DataSets
Updates/Sec The number of TVQ's that are being actively logged per second  
Readers The number of tags being read by the historian for client queries
Writers The number of tags actively being updated
HDB Files The total number of HDB files within all the DataSets
Offline Files The total number of HDB files currently 'offline' and not available to be read from within all DataSets
Disks Displays the free space on all available drives

In the lower left-hand corner you can view information about the currently selected DataSet.  To select a DataSet, click on it once.  It will be highlighted yellow once selected.

Name The name of the DataSet precedes all HDB files and is used in any ItemID
Tag Count Total number of tags residing in the most recent HDB file
Updates/Sec When logging is active this will show the total updates (TVQ's) per second for all tags in this DataSet
Readers The number of tags being read by the historian from this DataSet for client queries
Writers The number of tags actively being updated in this DataSet
HDB Files The total number of HDB files within this DataSet
Offline Files The total number of HDB files currently 'offline' within this DataSet
Directory Path where the HDB files are stored for this DataSet
Rollover If logging continues this will show the date and time the DataSet is configured to Rollover and create a new HDB file
Validate Depicts whether background validation has been set for the DataSet

When a DataSet is selected, the 'DATASET' window has an additional set of options which can be displayed by selecting the down arrow icon. These options include:

Roll-Over Forces a file Rollover to happen immediately
Roll-Up If configured within the DataSet settings, will force a Rollup to happen immediately
Obsolete Tags                 Provides a mechanism to obsolete tags that are within the DataSet by uploading and configuring a CSV file
Delete Property Allows for the deletion of a metadata property from the entire DataSet for all applicable tags
Refresh File List Refreshes the list of available HDB files displayed and is helpful if importing or copying HDB files into the directory
Validate All Files Performs a validation on all the HDB files within the DataSet

If more DataSets exist than can be displayed, a scroll bar at the top of the screen appears. This bar can be used to navigate throughout the collection of DataSets and can be adjusted.  Either grip can be positioned along the range to start or end at a particular DataSet instance. Dragging the yellow bar between the grips will vary the DataSets displayed but not the number of DataSets displayed.

An HDB file contains all of the tags, TVQs, and metadata properties written to a DataSet for a specific period of time, usually one day.  Within an HDB file, TVQs are grouped into blocks of records called vectors.  Vector size and the number of TVQs segmented within a vector are dependent on data type.

You may view all your HDB files by opening the Canary Admin application and then selecting the 'Historian' tile. The first screen of the Historian user interface displays every DataSet.  Double-click on a DataSet tile to browse all the available HDB files. 

When data begins to get logged to the DataSet, a new HDB file is automatically created and displayed.  When an HDB file is finished having data written to it, it is rolled over, then validated and closed.  A new HDB file is then automatically created. Anytime a Logging Session is stopped, an HDB file is closed, and eventually validated by the background validation process.  When the Logging Session is restarted, the current file is reopened for writing or a new HDB file is generated.

Additionally, HDB files will automatically roll over if they exceed 512 MB in size. To maximize historian efficiency, size DataSets to maintain only a single HDB file per day.

Each HDB file is represented by a tile with the date of the contained timestamps.  If there are more than one HDB files per day, the time the file was opened will also be displayed.

HDB files have several states.  These include:

  • Open - An HDB file is actively being written to and has not yet been validated or compressed.  Represented with a black clock in the upper left hand corner.
  • Closed - An HDB file has been validated and is no longer open to have data written. Represented with the tile colored dark blue.
  • Online - An HDB file is available to client queries. May or may not have been validated. Represented with the tile colored dark blue. If it is has not been validated, will contain a black clock in the upper left hand corner.
  • Offline - An HDB file is not available for client queries. May or may not have been validated. Represented with the tile colored grey.

When an HDB tile is selected it will turn yellow if it is an online file or light grey if it is an offline file.  More than one HDB file may be selected using SHIFT or CTRL.

Validation is an internal Canary process that is generally executed automatically.  During HDB file validation, all file structure and data links are checked. If a file does not pass validation, it is automatically moved to an offline status.

Caution, this process can create large files and may require an extended length of time to complete.

If an HDB file fails validation, the file must be recovered in order to be part of the available historical record.  Once manually initiated, file recovery is an automated process that involves the following steps:

  • The file is disassembled and all readable components are placed into text files
  • An import file is created by reformatting the text files into the proper time sequence
  • The new import file is then converted into an HDB file and brought online and revalidated
  • The original corrupted HDB file is preserved and marked with a .old extension but remains outside the available historical record

The admin has the choice to delete the old corrupted HDB file once they have verified the newly recovered HDB file is correct.

Double click a DataSet to access the 'HDB' file window for that DataSet. Select a single HDB file to access the FILE window on the lower left hand side of the screen. 

Created Creation date/time of the selected file.
Validated         If the file is validated the date/time is displayed.
Tag Count Number of tags in the selected file.
File Path Full path to the location of the selected file.
File Size Size of the file on the disk.
Embedded Size Files open for writing are larger because additional space is allocated for the TVQs that have yet to come in. This will display the size of the file with the extra space released.
Rolled Over True or False depending on whether the file rolled over to a new file (tag key is copied to the next file) or a new file was created when logging started.
Offline True or False depending if background validation detected errors in the file.
Status Either 'OK', '???', or 'Bad'

Based on the status indicator an admin should take the following action: 

OK                     Normal, nothing to do
??? File not properly closed, validating the file will properly close and move to 'OK' status if possible or will take offline if not. If placed offline, the admin can attempt to recover the file.
Bad File is corrupted but has not been validated to take offline. The admin can try validating the file manually or wait for the background validation process. If the file is placed offline, the admin can attempt to recover the file.

When an HDB tile is selected, the 'FILE' window has an additional set of options which can be displayed by selecting the down arrow icon. These options are different based on the status of the HDB file.

Online HDB Files are represented by a blue tile. This is the default state of HDB files. Select a single HDB file or multiple HDB files using either Shift or the CTRL key.  Then select the down arrow icon in the 'FILE' window to access the HDB file options.

Validate         Runs validation on the selected HDB file, checking all internal file structure and data links.
Take Offline Adds the offline extension to the file which prevents it from being accessed for reading or writing. May only be used when a single HDB file is selected.
Rename Tags Tags names can be renamed within the Canary Historian.

How to Rename Tags in Bulk

  1. Double-click the DataSet that houses the tag names that need changed. Double click the current HDB file (or the file that houses the tag names that must be changed).
  2. When looking at the full list of tags within the HDB file, select the white drop down arrow. Uncheck the 'Include Parent Path' checkbox.
  3. Select 'ok'. Save the CSV file.
  4. Open up the CSV file in Excel and copy and paste the tag names into column B. Change all tag names in column B as needed. Save the CSV file.
  5. Open the Canary Admin. Select the 'Historian' tab. Select the 'Database' tab.
  6. Double-click the same DataSet in step 2. Single click the HDB2 file that houses the tags that need changed.
  7. Select the yellow drop down menu. Select 'RENAME TAGS'. This dialog appears.  You will not need to adjust 'Header Count' or 'Source tag paths column' or 'Destination tag paths column'.
  8. Select 'browse' to find the CSV file saved in step 6.
  9. Decide whether you wish to change the tag name in the entire DataSet, only this HDB file, this HDB file and later, or this HDB file and earlier.
  10. Select 'ok'.

You may receive an error message that references a text file.  You can find the text file in the same directory as the CSV file you tried to upload.  Sometimes an error will occur but the tags will also be successfully renamed.  Verify the tag names have or have not been updated prior to troubleshooting the error file.

Should you choose to use an existing CSV file to accomplish the rename other than the file described above, you will need to format the 'Header Count', 'Source tag paths column', and 'Destination tag paths column' accordingly.

Offline files are represented by gray tiles and have a different 'FILE OPTIONS' menu.  An HDB File is in an offline state when manually taken offline, or if the validation process has found errors or corrupt values within an HDB file.  Select a single HDB file or multiple HDB files using either Shift or the CTRL key.  Then select the down arrow icon in the 'FILE' window to access the HDB file options.

Validate         Runs validation on the selected HDB file, checking all internal file structure and data links.
Put Online Removes the offline extension to allow access for reading and writing.
Recover Available only for Offline files. When a file is taken off-line due to a validation problem, this option will recover any usable data without risking the existing data. 
Delete Available only for off-line files. Brings up a dialog to confirm the permanent deletion of the file. 

If more HDB files exist than can be displayed, a scroll bar at the top of the screen appears. This bar can be used to navigate throughout the collection of HDB files and can be adjusted.  Either grip can be positioned along the range to start or end at a particular HDB instance. Dragging the yellow bar between the grips will vary the HDB files displayed but not the number of HDB files displayed.

From the Database tab of the Historian tile, double click an active DataSet, then double-click an HDB file. The 'TAGS' window is on the left side of the screen. 

  1. Select a tag. Timestamps, Values, and Tag Qualities populate on the right side of the screen.
Row Displays the row of a TVQ
Timestamp
 
A timestamp records the time a TVQ was logged. The resolution of the timestamp can be altered, as needed, to save storage space. Canary supports a timestamp resolution down to 100 nanoseconds. The resolution of a timestamp must be altered from within the data source or can be normalized depending on the collector being used. While in the Historian, the timestamp is stored in UTC format or Universal Coordinated Time. Timestamps are converted to the local time-zone of the client requesting data.
Value The value of a TVQ is represented by a numeric digit, either an integer or float, that supports up to 28 digit decimal precision, a Boolean, or string.
Quality
 
The quality score is a string passed from the OPC Server. The basic Quality Scores supported by the Historian are: Good, Bad, No Data, and Uncertain, each of these four main quality scores can have more specific details. Canary supports all OPC Foundation Quality scores.
Type
 
Lists the data type of the tag. The Data Type determines how many TVQs are contained within a Vector. 

Select 'Trend' to view the selected tag's TVQ updates on a quick trend chart.

The tag list can be exported as a CSV file by:

  1. Select the down arrow icon beside the search bar in the 'TAGS' window. 
  2. Select 'Include Parent Path' to list entire tag names, with the DataSet included, or unselect to have just the tag name.
  3. Select 'ok'.

The 'PROPERTIES' Window on the bottom left side of the screen, displays  additional tag information.  Tags that have metadata properties will have those properties displayed here.  (If metadata is configured to be stored in an external SQL database, they will not appear here, but they will appear in the Views tile.) Calculated tags, tags created using the Canary Calculation Server, will also display information. 

Calculated by Displays the title of the calculation group that outputs this calc tag.
CalculatedByGUID Displays the global unique identifier of the machine that has created the selected calculated tag.
Metadata Properties Displays various metadata such as engineering units, high/low setpoints, high/low limits, and custom made metadata as well.

Select the drop down arrow in the 'PROPERTIES' window.

Rename Renames a single tag within the DataSet.  Options include adjusting the current HDB file, all HDB files, or HDB files before or after the current.
Delete Property Allows for the deletion of a metadata property from the entire DataSet for the selected tag only.

Reply

null