You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Roberta Marton (JIRA)" <ji...@apache.org> on 2015/10/17 00:55:05 UTC

[jira] [Closed] (TRAFODION-1483) External tables for Native HBase tables

     [ https://issues.apache.org/jira/browse/TRAFODION-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roberta Marton closed TRAFODION-1483.
-------------------------------------
    Resolution: Fixed

Fixed with pull request #74

> External tables for Native HBase tables
> ---------------------------------------
>
>                 Key: TRAFODION-1483
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1483
>             Project: Apache Trafodion
>          Issue Type: New Feature
>          Components: sql-general
>    Affects Versions: 2.0-incubating
>            Reporter: Roberta Marton
>            Assignee: Roberta Marton
>             Fix For: 2.0-incubating
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Trafodion supports selecting, loading from, listing, and describing native HBase tables. HBase tables are identified by specifying a special catalog called HBASE and schemas called "_ROW_" and "_CELL_".
> Example to select from a native HBase table:
> select left(row_id, 10) as row_id, left(column_display(column_details, ('teams:team_number', 'games:visitor_team', 'games:game_time')), 100) as cols from hbase."_ROW_"."baseball";
> Trafodion interprets the special HBASE catalog be a native HBase table. During preparation of an SQL statement referencing a native HBase table, Trafodion contacts HBase and obtains a description of the table. It then creates an internal description (NATable) of the HBase table. The NATable definition is used by the compiler and code generation process to prepare the plan. Trafodion does not store any details in Trafodion metadata.
> Several Trafodion commands today, would work more effectively if we allow native HBase tables to be partially described in Trafodion. That is, store their definitions in Trafodion metadata. This JIRA describes a proposal to allow native HBase tables to be registered in Trafodion metadata by specifying the “CREATE EXTERNAL <table> TABLE …” syntax.
> Proposal
> Allow native HBase tables to be registered in Trafodion metadata through the EXTERNAL TABLE create option.
> CREATE EXTERNAL TABLE [IF NOT EXISTS] table FOR hbase-source-table;
> DROP EXTERNAL TABLE [IF EXISTS] table FOR hbase-source_table
> hbase-source-table - native HBase table to be registered in the Trafodion metadata. The hbase-source-table has to exist.
> table - table stored in Trafodion metadata. Initially, the table name should be the same as the hbase-source-table name. 
> The default catalog name for HBase tables are HBASE (defined in ComSmallDefs as HBASE_SYSTEM_CATALOG).
> To change the description, the external table needs to be dropped then recreated. ALTER EXTERNAL TABLE is not supported.
> The following command’s behavior changes for external tables:
> •	UPDATE STATISTICS – an external table can be used to gather statistics for HIVE tables
> •	SHOWDDL – will now be allowed on external tables
> •	GRANT and REVOKE – privileges can be specified for external tables
> •	SELECT and LOAD – will be allowed on external tables
> This is a sister project to JIRA TRAFODION-19 and implemented in much the same way.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)