Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1500814 - Cannot run time-based queries against Osisoft PI [NEEDINFO]
Cannot run time-based queries against Osisoft PI
Status: CLOSED WONTFIX
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid, Documentation (Show other bugs)
6.4.0
Unspecified Unspecified
high Severity high
: GA
: 6.4.0
Assigned To: David Le Sage
Jan Stastny
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-11 10:24 EDT by Andrej Smigala
Modified: 2018-02-01 03:22 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
You cannot run time-based queries against Osisoft PI. This is because JDV pushes a cast to the string on the Time column, which results in a string comparison on the datasource.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-01 03:22:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
vhalbert: needinfo? (asmigala)


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker TEIID-5097 Major Resolved Cannot run time-based queries against Osisoft PI 2018-02-07 06:13 EST

  None (edit)
Description Andrej Smigala 2017-10-11 10:24:07 EDT
Osisoft PI supports a relative time literals syntax, e.g.

> select * from dvqe.Data.Archive a where a.time between '*-14d' and '*'

will select all data between right now and 14 days ago, and

> select * from dvqe.Data.Archive a where a.time > 'y'

will select all data after yesterday midnight.
The string literals are converted to time values in the PI Server

Running the same queries through teiid however returns incorrect results, because teiid pushes a cast to string on the Time column, which results in string comparison on the datasource

Pushed query:

> SELECT TOP 100 cast(g_0.[ElementAttributeID] as String), g_0.[Time] AS c_1, g_0.[Value] AS c_2, g_0.[ValueInt] AS c_3, g_0.[ValueDbl] AS c_4, g_0.[ValueStr] AS c_5, cast(g_0.[ValueGuid] as String), g_0.[ValueDateTime] AS c_7, g_0.[Status] AS c_8, g_0.[Annotated] AS c_9, g_0.[IsGood] AS c_10, g_0.[Questionable] AS c_11, g_0.[Substituted] AS c_12 FROM [dvqe].[Data].[Archive] AS g_0 WHERE cast(g_0.[Time] AS String) > 'y'
Comment 4 David Le Sage 2017-11-27 17:58:33 EST
Documented as known issue in release notes errata.

Note You need to log in before you can comment on or make changes to this bug.