AnsweredAssumed Answered

PI Integration with Teiid

Question asked by alkarim.samji on Apr 23, 2016
Latest reply on Apr 25, 2016 by alkarim.samji

I am trying to connect the PI JDBC adapter with Teiid data virtualization engine, and am running into some errors. Has anyone seen these errors before?

Here are some details about the environment:

  • Teiid version 8.13.3
  • JDK version 1.8.0.77
  • Wildfly version 9.0.2
  • SQL DAS version 1.4.1.403
  • PI JDBC 1.4.1.404

SQL DAS is running on a different server than the Teiid client node. I have deployed the following virtual database file after configuring the JDBC driver, but there is a parse exception on the model. Here is the VDB content:

<vdb name="PIAF" version="1"> 
    <description>OSIsoft PI AF</description>   
    <model name="PIAF-Physical" type="PHYSICAL">
        <property name="importer.useFullSchemaName" value="false"/>
  <property name="importer.tableTypes" value="TABLE,VIEW"/>
        <source name="piaf-connector" translator-name="osisoft-pi" connection-jndi-name="java:/pi-ds"/>
    </model>
    <model name="PIAF-Virtual" type="VIRTUAL">
        <metadata type="DDL"><![CDATA[
        CREATE VIEW IceData (
            Parent varchar(max),
   Attribute varchar(max),
   Timecol date,
            Value bigdecimal
        ) AS 
          SELECT eh.Name as Parent, ea.Name as Attribute, a.Time as Timecol, a.Value FROM [Calgary Flames].[Asset].[ElementHierarchy] eh INNER JOIN [Calgary Flames].[Asset].[ElementAttribute] ea ON ea.ElementID = eh.ElementID INNER JOIN [Calgary Flames].[Data].[Archive] a ON a.ElementAttributeID = ea.ID WHERE eh.Path = N'\' AND a.Time BETWEEN N'*-1h' AND N'*'  
        ]]> </metadata>
    </model>
</vdb>

 

 

Here is the error thrown by the JBoss server:

15:13:11,453 WARN  [org.teiid.RUNTIME] (Worker0_async-teiid-threads1)  TEIID5003
6 VDB PIAF.1 model "PIAF-Physical" metadata failed to load. Reason:TEIID60013 Du
plicate Table ft_GetPIPoint: org.teiid.metadata.DuplicateRecordException: TEIID6
0013 Duplicate Table ft_GetPIPoint
        at org.teiid.metadata.Schema.addTable(Schema.java:49)
        at org.teiid.metadata.MetadataFactory.addTable(MetadataFactory.java:220)
        at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataPr
ocessor.java:344)
        at org.teiid.translator.jdbc.JDBCMetdataProcessor.addTable(JDBCMetdataPr
ocessor.java:327)
        at org.teiid.translator.jdbc.JDBCMetdataProcessor.getTables(JDBCMetdataP
rocessor.java:300)
        at org.teiid.translator.jdbc.JDBCMetdataProcessor.getConnectorMetadata(J
DBCMetdataProcessor.java:159)
        at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecut
ionFactory.java:295)
        at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecut
ionFactory.java:68)
        at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeM
etadataRepository.java:92)
        at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(Native
MetadataRepository.java:60)
        at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(Chai
ningMetadataRepository.java:55)
        at org.teiid.jboss.VDBService$6.run(VDBService.java:395)
        at org.teiid.jboss.VDBService$7.run(VDBService.java:446)
        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkCon
text.java:276)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.ru
n(ThreadReuseExecutor.java:119)
        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseE
xecutor.java:210)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
        at java.lang.Thread.run(Thread.java:745)

Outcomes