Northern Mockingbird. Copyright © 2002 OSI Software, Inc. All rights reserved. PI OLE DB COM...

Preview:

Citation preview

Northern Mockingbird

Copyright © 2002 OSI Software, Inc. All rights reserved.

PI OLE DB COM Connector Making Relational Databases Look Like PI

Benny Gallardo

Outline

• Goals of the connector• COM connectors vs. Interfaces• OLE DB simplified• Connector as a Translator• Summary and announcements

Goals

• Access to relational data for all PI clients• Expand the power & utility of PI clients

– PI-ProcessBook– PI-DataLink– PI-ACE (Advanced Calculation Engine)– All current and future client tools

Interfaces put data into the PI archive

Oracle

SQLServer

Problem: Redundancy of data

Benefit: PI client access

RdB InterfacePI

A COM Connector is not an interface

Data is transferred but not stored in PI

No redundancy of data

Oracle

SQLServer

OLE DB COM ConnectorPI

COM Connector Points

• COM Connector points have 3 special attributes– ctr_progid– ctr_strmap– ctr_lmap

• Key attributes for OLE DB points– ctr_udlpath– ctr_compath

OLE DBData

Source

DataConsumer

OLE DBProvider

OLE DB - A Model for Data Transfer

OracleOLE DB

COMConnector

OracleProvider

OLE DB - A Model for Data Transfer

1. Access the provider2. Translate client requests

OLE DB COM Translator

• Translate PI client requests into SQL

RdBProvider

PI & OLE DB

ConnectorRdB

PI Client

Accessing the OLE DB Provider

• ctr_udlpath

OLE DBCOM

Connector

OLE DBProvider

.UDL File

Provider NameUser namePassword

Translating Client Requests

• All client requests represented as five simple SQL queries

• ctr_compath Text file contains5 queries

Query #1 – Retrieve a value at time t1

Time

Value

t1

Query #2 – Retrieve values between times t1 time t2 (inclusive)

Time

Value

t1 t2

Query #3 – Retrieve value immediately preceding time t1

Time

Value

t1

Query #4 – Retrieve value immediately following time t2

Time

Value

t2

Query #5 – Retrieve most recent value

Time

Value

Query Structure

• Retrieve time, value, and status– raw SQL– stored procedures or functions

• Query optimization

Summary

• Goal: PI client access to relational data– DataLink, ProcessBook, & ACE

• COM Connectors vs. Interfaces– Redundancy of data

• OLE DB Connector point attributes– ctr_udlpath– ctr_compath

• Five fundamental SQL queries

Announcements

• The beta is available at www.osisoft.com.• The COM connector will be running in the demo

room this afternoon with Oracle 9i, SQL Server 2000, and PI 3.3.