[JBoss JIRA] (TEIID-2522) Let Extract(<Oracle Date field>) extract time components
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2522?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-2522:
----------------------------------
You should be able to work around this with:
SELECT EXTRACT(HOUR FROM cast(cast(a.modifieddate as string) as timestamp)) ...
> Let Extract(<Oracle Date field>) extract time components
> --------------------------------------------------------
>
> Key: TEIID-2522
> URL: https://issues.jboss.org/browse/TEIID-2522
> Project: Teiid
> Issue Type: Enhancement
> Components: JDBC Connector
> Reporter: Alex K.
> Assignee: Steven Hawkins
> Priority: Minor
>
> According to the Oracle's docs:
>
> "The DATE datatype stores point-in-time values (dates and times) in a table. The DATE datatype stores the year (including the century), the month, the day, the hours, the minutes, and the seconds (after midnight)."
>
> I expect to be able to extract the time parts from a date field, but when I am trying to extract the hour from an oracle's date field like:
>
> {code:sql}
> SELECT EXTRACT(HOUR FROM a.modifieddate)
> FROM oracle_db.salestaxrate a
> WHERE a.salestaxrateid = 1
> {code}
>
> and get a TEIID30504 exception. When I look deeper in Teiid's log, i see the following Oracle's exception:
>
> Caused by: java.sql.SQLException: Remote java.sql.SQLException: ORA-30076: invalid extract field for extract source
> That is an odd Oracle limitation - http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions052.htm
>
> "If HOUR, MINUTE, or SECOND is requested, then expr must evaluate to an expression of datatype TIMESTAMP, TIMESTAMP WITH TIME ZONE, TIMESTAMP WITH LOCAL TIME ZONE, or INTERVAL DAY TO SECOND. DATE is not valid here, because Oracle Database treats it as ANSI DATE datatype, which has no time fields."
> *please enable extracting of time components from oracle's Date Fields* despite the Oracle's limitation
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (TEIID-2524) Hive metadata import leaves whitespace characters in column names
by Filip Nguyen (JIRA)
[ https://issues.jboss.org/browse/TEIID-2524?page=com.atlassian.jira.plugin... ]
Filip Nguyen commented on TEIID-2524:
-------------------------------------
I am using the 0.11. I will try to go through the JIRAs you have collected and find out whether the issue is going to be addressed, if not I will probably log JIRA for Hive as this is not a bug in Teiid.
> Hive metadata import leaves whitespace characters in column names
> -----------------------------------------------------------------
>
> Key: TEIID-2524
> URL: https://issues.jboss.org/browse/TEIID-2524
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4
> Reporter: Filip Nguyen
> Assignee: Steven Hawkins
>
> When hive translator starts with the newest Hive it runs "describe" command which returns Hive column names with white spaces.
> Maybe just use trim() in HiveMetadataProcessor.java?
> String name = rs.getString(1).trim();
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (TEIID-2524) Hive metadata import leaves white characters in table name
by Filip Nguyen (JIRA)
[ https://issues.jboss.org/browse/TEIID-2524?page=com.atlassian.jira.plugin... ]
Filip Nguyen commented on TEIID-2524:
-------------------------------------
Sorry for bad report. The problem are in fact column names. Mixed up in my mind. Below is my DDL and the query that I have to write to select from the INTKEY column. From hive console I can simply write "select intkey from smalla" and it works.
{code}
CREATE EXTERNAL TABLE smalla(INTKEY INT,
STRINGKEY STRING,
INTNUM INT,
STRINGNUM STRING,
FLOATNUM FLOAT,
LONGNUM BIGINT,
DOUBLENUM DOUBLE,
BYTENUM DECIMAL,
DATEVALUE TIMESTAMP,
TIMEVALUE TIMESTAMP,
TIMESTAMPVALUE TIMESTAMP,
BOOLEANVALUE BOOLEAN,
CHARVALUE STRING,
SHORTVALUE SMALLINT,
BIGINTEGERVALUE DECIMAL,
BIGDECIMALVALUE DECIMAL,
OBJECTVALUE BINARY)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '44' LINES TERMINATED BY '\n'
STORED AS TEXTFILE
LOCATION '/data/bqt/smalla';
{code}
{code}
./run.sh QT_Hive_Push "select \"intkey \" from smalla"
{code}
> Hive metadata import leaves white characters in table name
> ----------------------------------------------------------
>
> Key: TEIID-2524
> URL: https://issues.jboss.org/browse/TEIID-2524
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4
> Reporter: Filip Nguyen
> Assignee: Steven Hawkins
>
> When hive translator starts with the newest Hive it runs "describe" command which returns Hive table names with white spaces.
> Maybe just use trim() in HiveMetadataProcessor.java?
> String name = rs.getString(1).trim();
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (TEIID-2524) Hive metadata import leaves whitespace characters in column names
by Filip Nguyen (JIRA)
[ https://issues.jboss.org/browse/TEIID-2524?page=com.atlassian.jira.plugin... ]
Filip Nguyen updated TEIID-2524:
--------------------------------
Description:
When hive translator starts with the newest Hive it runs "describe" command which returns Hive column names with white spaces.
Maybe just use trim() in HiveMetadataProcessor.java?
String name = rs.getString(1).trim();
was:
When hive translator starts with the newest Hive it runs "describe" command which returns Hive table names with white spaces.
Maybe just use trim() in HiveMetadataProcessor.java?
String name = rs.getString(1).trim();
> Hive metadata import leaves whitespace characters in column names
> -----------------------------------------------------------------
>
> Key: TEIID-2524
> URL: https://issues.jboss.org/browse/TEIID-2524
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.4
> Reporter: Filip Nguyen
> Assignee: Steven Hawkins
>
> When hive translator starts with the newest Hive it runs "describe" command which returns Hive column names with white spaces.
> Maybe just use trim() in HiveMetadataProcessor.java?
> String name = rs.getString(1).trim();
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months