[teiid-issues] [JBoss JIRA] (TEIID-5896) enable EXTRACT EPOCH/QUARTER from timestamp

Ken Geis (Jira) issues at jboss.org
Mon Feb 3 16:38:33 EST 2020


Ken Geis created TEIID-5896:
-------------------------------

             Summary: 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: Barry LaFond


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.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the teiid-issues mailing list