4 Replies Latest reply on Nov 21, 2018 7:13 AM by HardikS

    PI To RDBMS

    HardikS

      I would like to write values in tags to RDBMS as it got updated / on schedule bases.

      What can be the approach ?

      PI-AF SDK (If available / created in AF)

      I have thought of consuming data from PI-AF at java layer and can be written in RDBMS.

       

      Any suggestions / comment ?

        • Re: PI To RDBMS
          Eugene Lee

          My recommendation is to use the PI Interface for RDBMS. You can find an example in the link below.

           

          PI Interface for Relational Database (RDBMS via ODBC)

           

          To write values from the PI Data Archive to RDBMS tables, you define output tags, which execute an SQL query or stored procedure containing INSERT, UPDATE or DELETE statements. Output tags can be scanned (Location4 is set to a scan class) or event-driven (SourceTag specifies a tag which, when changed, triggers execution of the query.) For an event-driven output tag, if the query succeeds, the output tag’s value is set to the value of its source tag. If the query fails, its value is set to the "Bad Output" digital state.

          To insert a row to a table, create an output tag with an INSERT query that specifies the target table and a set of placeholders.