OSISoft PI Data Sources

The driver is not provided with Teiid install, this needs be downloaded from OSISoft and installed correctly on Teiid server according to OSISoft documentation PI-JDBC-2016-Administrator-Guide.pdf or latest document.

Install on Linux

Make sure you have OpenSSL libraries installed, and you have following "export" added correctly in your shell environment variables. Otherwise you can also add in <WildFly>/bin/standalone.sh file or <WildFly>/bin/domain.sh file.

export PI_RDSA_LIB=/<path>/pipc/jdbc/lib/libRdsaWrapper-1.5b.so
export PI_RDSA_LIB64=/<path>/pipc/jdbc/lib/libRdsaWrapper64-1.5b.so

Please also note to execute from Linux, you also need install 'gSoap' library, as PI JDBC driver uses SOAP over HTTPS to communicate with PI server.

Install on Windows

Follow the installation program provided by OSISoft for installing the JDBC drivers. Make sure you have the following environment variables configured.

PI_RDSA_LIB     C:\Program Files (x86)\PIPC\JDBC\RDSAWrapper.dll
PI_RDSA_LIB64   C:\Program Files\PIPC\JDBC\RDSAWrapper64.dll

Installing the JDBC driver for Teiid (same for both Linux and Windows)

Then copy the module directory from <WildFly>/teiid/datasources/osisoft-pi/modules directory into _<WilfFly>/modules directory. Then find the "PIJDBCDriver.jar" file from the installation directory, and copy it to _<WildFly>/module/system/layers/dv/com/osisoft/main" directory. Then add the driver definition to the standalone.xml file by editing the file and adding something similar to below

       <driver name="osisoft-pi" module="com.osisoft">

That completes the configuration of the PI driver in the Teiid. We still have not created a connection to the PI server.

You can start the server now.

Creating a Data Source to PI

You can execute following similar CLI script to create a datasource

/subsystem=datasources/data-source=pi-ds:add(jndi-name=java:/pi-ds,  driver-name=osisoft-pi, connection-url=jdbc:pioledbent://<DAC Server>/Data Source=<AF Server>; Integrated Security=SSPI,user-name=user, password=mypass)

this will create following XML in standalone.xml or domain.xml (you can also directly edit these files and add manually)

<datasource jndi-name="java:/pi-ds" pool-name="pi-ds">
    <connection-url>jdbc:pioledbent://<DAC Server>/Data Source=<AF Server>; Integrated Security=SSPI</connection-url>

Now you have fully configured the Teiid with PI database connection. You can create VDB that can use this connection to issue queries.

results matching ""

    No results matching ""