]
Steven Hawkins updated TEIID-5896:
----------------------------------
Original Estimate: 5 hours
Remaining Estimate: 5 hours
Story Points: 1
enable EXTRACT EPOCH/QUARTER from timestamp
-------------------------------------------
Key: TEIID-5896
URL:
https://issues.redhat.com/browse/TEIID-5896
Project: Teiid
Issue Type: Enhancement
Components: Grammar
Affects Versions: 12.3.1
Reporter: Ken Geis
Assignee: Steven Hawkins
Priority: Major
Fix For: 13.1
Original Estimate: 5 hours
Remaining Estimate: 5 hours
I am connecting to Teiid from Tableau using the JDBC driver and PostgreSQL dialect. I try
to drill into a timestamp field, and I get some complaints parsing the SQL. In particular,
it has trouble with:
{code:java}
EXTRACT(QUARTER FROM the_time)
EXTRACT(EPOCH FROM the_time)
{code}
The docs suggest these datetime components are not supported by Teiid. They are not
standard, but supporting them would get me a step closer to running Tableau against Teiid
(a killer app!)
I was able to work around the QUARTER by dismissing the error, drilling down to month,
dismissing the error again, then dragging the quarter out of my drill-down.
I worked around the EPOCH by moving a date difference from being calculated in Tableau to
calculating it in Teiid with TIMESTAMPDIFF.
An alternate I tried was using Tableau's SQL92 dialect, but it issues a "SELECT
TOP" clause that is not SQL92 standard and also not supported by Teiid.