Hi,
I would like to make a suggestion regarding the "read from HBase" functionality
("Ways to Access HBase tables" as of page 22 in the SQL Reference Manual). I
really like this feature, but I think it should be extended to
a) return not only row or cell, but also an entire table (with all column
families and column qualifiers one can find in that table). I tried to do this,
but with only two columns this is quite difficult already (SQL Statement below)
b) return the same data which was entered when accessing a Trafodion
native table. If data type is int, the function will return empty cells or some
not readable special characters (I assume that the reason for this is that
Trafodion doesn't use the 2-complement with negative numbers?). Thus, I cannot
CAST it to int again.
The SQL Statement to transpose the _CELL_ format into relational table format
has been: It requires a join against itself and several tests
INSERT INTO MYTABLE
SELECT CAST(T1.COL_VALUE AS INT), CAST(T2.COL_VALUE AS INT)
FROM HBASE."_CELL_"."TRAFODION.TRAFODION.MYTABLE" AS T1,
HBASE."_CELL_"."TRAFODION.TRAFODION.MYTABLE" AS T2
WHERE
CAST(T1.ROW_ID AS INT) = CAST(T2.ROW_ID AS INT)
AND T1.COL_NAME = 'C1'
AND T2.COL_NAME = 'C2';
Best regards
Layla
Layla Martin
HP DualStudy
Hewlett-Packard GmbH
Telefon +49 7031 4504682
[email protected]<mailto:[email protected]>
Herrenberger Strasse 140| 71034 Böblingen|
www.hp.com/de/dualstudy<http://www.hp.com/de/dualstudy>
[Description: Description:
http://intranet.hp.com/country/germany/live/PublishingImages/NeuesLogoSmall.png]
Follow us on: [facebook] <https://www.facebook.com/DualStudy.hp> [twitter]
<http://twitter.com/hpdualstudy> [youtube]
<http://www.youtube.com/user/hpDualStudy>
Geschäftsführer: Heiko Meyer (Vorsitzender), Thomas Bässler, Volkhard Bregulla,
Michael Eberhardt, Jochen Erlach, Angelika Gifford, Ernst Reichart
Vorsitzender des Aufsichtsrats: Jörg Menno Harms
Sitz der Gesellschaft: Böblingen, Amtsgericht Stuttgart HRB 244081
WEEE-Reg.-Nr. DE 30409072