SQL Tag Template
  • 03 Oct 2023
  • PDF

SQL Tag Template

  • PDF

Article summary

This information is specific to the latest release of PARCview:

7.2.x


PARCview can read and present information from any OLE DB or ODBC compatible data sources that can return time-sequenced values. This includes data stored in Microsoft SQL Server, ORACLE, and other relational databases.

PARCview uses SQL query templates to retrieve data from SQL databases. A SQL Tag Template is a set of SQL scripts that each return a specific data set based on the nature of the request from PARCview. Examples of these requests include building a tag list or retrieving tag data points. Each script is expected to return data in a specific column order, but it can be queried out in different ways depending on how it is stored in its native source and what constraints or criteria are desired.

A SQL Tag Template will typically correspond to one data source. PARCview uses the template’s scripts to retrieve the requested data for all tags in this source. Note, however, that multiple sources can use the same template, and multiple templates can access the same SQL database.

SQL Tag Templates feature tokens for dynamic text-to-value substitution. At execution the tokens are replaced in the query with appropriate argument values retrieved from PARCview. For example, queries will use information from PARCview displays, like using the start and end times of a trend as the start and end time bounds in data queries. User-defined tokens can also be used as custom parameters for retrieving a tag list, if needed.


PARCSecurity Permissions

PARCsecurity Console should be configured for the following permissions for rights to System Configuration elements.

  • DataPARC Admin: Grants administrative access to PARCview.
  • System Config Process Area: Grants access to the Process Area tab in System Configuration.
  • System Config Process Tags: Grants access to the Process Tags tab in System Configuration.
  • System Config Reason/Evidence/Category: Grants access to the Reason, Evidence and Category tabs in System Configuration.


Configuration

SQL Tag Templates contain scripts for different types of data requests. Each script must return a specific type of data set, depending on the nature of the request. This section will cover the different types of scripts and their purposes, the requirements for each script and some examples, as well as using tokens in scripts for dynamic text-to-value substitution.

There are three basic script types:

Tag Queries: That are used by PARCview to get tag information

Read Data Queries: that return tag values for a given time frame

Write Data Queries: that modify tag values in their source


Log Files

PARCMessage is a built-in error monitoring software. It creates an ongoing log of errors generated from PARCview on the specific computer where PARCMessage is running in the system tray. The Icon in the tray is a triangle, red if errors are present, and green if there are no errors.

Errors can also be stored in the PARCview install directory both on the server and clients ...\Capstone\PARCView\LogFiles.


Required Server Applications

No server applications are required to use System Configuration.

UA Server: All PARCview vr 7 functionality requires a Universal Access (UA) server.

GDS: All PARCview vr 7 functionality requires a Global Discovery Server (GDS).


Was this article helpful?

What's Next