3 Replies Latest reply on Aug 26, 2016 12:58 PM by JeremyMahon

    RDBMS interface/future data - if there are no values for a certain period, write zero

    JeremyMahon

      All,

       

      Here's the scenario: I have a RDBMS interface grabbing day-ahead data for MW forecasts from an Oracle DB. The process that loads the data into the Oracle DB only writes what it downloads. Meaning, if there is MW data for a few hours of the day, that's all it will write. There are no NULLs for the other remaining hours of the day. If there were NULL values, then the RDBMS to Pi interface would handle it no problem.

       

      When you view this data on a trend in Coresight, it shows "No Data" and in ProcessBook, it will show the last value (obviously even if it's from many moons ago). The problem here is that to our operational staff sees these values and assumes a unit should be online. As a temporary fix, I created a manual UFL loader and generate zero values in Execl as ArcNoReplace to fill in any gaps. However, this is obviously not sustainable as those Excel files can get huge (70 units * 365 days * 24 hours per day = 613200 rows in Excel).

       

      Any ideas? I have talked to the Oracle DBAs and they don't want to change their loading process to write NULL rows, so that's out. I am thinking that somehow writing zeros for each unit, for each day, and then letting the RDBMS interface overwrite those with good values is the best bet. However, I was curious if anyone has any ideas to do this in Pi. I was thinking PEs with a simple IF statement, but then you'd need two tags instead of just one (one to load the RDBMS data, one for the PE).

       

      Thanks,
      Jeremy