How do we get data from PI Server 2015 using PI SQL?
Is there a new version of PI OLEDB Enterprise that supports Future Data?
PI OLEDB Enterprise relies on AF SDK to retrieve data on the backend, so to query for future events, the machine that runs PI OLEDB Enterprise also needs to have AF Client 2.7 installed. Currently, AF Client 2015 Beta should allow you to query for future events on future-enabled PI Points, although of course we recommend the Beta should only be used for testing purposes.
PI Asset Framework (AF) Client 2015 Beta Install Kit
To get recorded values within a future range, you can use for example the Data.Archive query and pass in a time range covering future times. Note that Data.Snapshot should give the "current value" rather than the "end-of-stream" value for future tags.
Thank you Barry! I will try that out.
One more question on PI OLEDB Enterprise. If we need to configure it as a Linked Server on a SQL Server, does that mean we need to install PI OLEDB Enterprise on the SQL Server?
We are using a SQL farm.
Yes, for linked server configurations, PI OLEDB Enterprise will need to be installed on all the SQL Server machines in the cluster/farm. Here are some helpful resources for setting up the linked server.
KB01143 - How to configure a linked server with PI OLEDB or PI OLEDB Enterprise
Recommended configuration for Linked Server in Microsoft SQL Server
PI OLEDB Enterprise install kit comes with a version of AF Client lower than AF Client 2015 Beta, so this beta AF Client will need to be installed/upgraded separately on the OLEDBEnt/SQL machines. This configuration (OLEDBEnt 2012/AF 2015) can be used for testing but not recommended for production use. We are working on a newer query engine which should offer a more standard setup and support for newer server features.
Thanks again Barry!
Can we use PI SQL without a Linked server? If so, can we use a Java program to query AF / PI using PI SQL?
Yes it is possible to use without a Linked Server. We actually have quite a few products that allow access to PI System in a relational manner. Please see the section PI SQL Framework for a list of PI SQL products.
For Java applications, there is the PI JDBC Driver.
PI JDBC Driver - Overview
Here, the backend technology is still PI OLEDB Enterprise, but the driver provides a layer for Java applications to access.
Here are some ways to use PI SQL without a Linked server.
To add: the current Provider supports future data, if the data is a time-series AFtable lookup in AF. For e.g. forecasting data stored in a database this works fine!
Be aware of the limitations of AFtable lookups though.
Retrieving data ...