JDBC Query
By using the JDBC Query activity you can set tag values, retrieve tag definitions and retrieve the tag value with the most recent timestamp or historical tag values within a specified time range. You can set the values of the tag and the timestamp with specified time and tag value.
General
On the General tab, you can specify the name of the activity in the process, establish a connection to the PI JDBC server, select the type of operation you want to perform, specify and export the XSD schema.
| Field | Module Property? | Visual Diff? | Description |
|---|---|---|---|
| Name | No | Yes | A unique name of the activity in a process. |
| Server Connection | Yes | Yes | The PI JDBC shared resource selected to connect to a PI JDBC server.
Click the
|
| Operation | No | Yes | The type of operation you want to perform: |
| Use Wildcards | No | Yes | The option that determines precise query or fuzzy query is performed on the PI Data Archive server according to the tag names you enter on the Input tab. |
| Attributes to Export | No | No | The list of value attributes that you can select to specify the schema for the output data on the
Output tab.
You can also load a customized output schema file for your JDBC activity. For more information, see Customizing JDBC Output Schema. |
| Export xsd schema | No | No | After finishing your selection in Attributes to Export or loading a customized output schema file, click this button to export the schema which is then displayed on the Output tab. |
Input
On the Input tab, you can specify the tag name, time span, or both for your activity.
| Operation | Refer |
|---|---|
| getSnapshot and getTagDefinition | getSnapshot and getTagDefinition: Input Items |
| getArcvalue | getArcvalue: Input Items |
| getValueHistory | getValueHistory: Input Items |
| setTagValues | setTagValues: Input Items |
Output
On the Output tab, you can find the output results structured in the schema you specify on the General tab.
For the getSnapshot and getTagDefinition activities, results of only the tags that have matching data on the PI Data Archive server are returned.
| Operation | Refer |
|---|---|
| getSnapshot | getSnapshot: Output Items |
| getArcvalue | getArcvalue: Output Items |
| getTagDefinition | getTagDefinition: Output Items |
| getValueHistory | getValueHistory: Output Items |
| setTagValues | setTagValues: Output Items |
Fault
On the Fault tab, you can find the error messages and error codes of the JDBC Query activity. For more information about errors, see Error Codes.

icon to select an OSIsoft PI System JDBC connection resource. If no matching PI JDBC connection resource is found, click