Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-1586

Add support to create an external Trafodion table and map it to a native HBase table



    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      Proposal to create an external table in Trafodion metadata and map it to an existing HBase table.

      Listed below are proposed syntax and semantics rules for this support.

      Proposed Syntax:
      create external table T (…column definitions…) map to hbase table T;
       this will create a Trafodion table in metadata with columns specified in ‘column definitions’ and
      map that definition to an externally created native HBase table T.

      alter table T add column b;
      alter table T drop column b;
       will add and drop column ‘b’ from Trafodion metadata. Underlying mapped HBase table will not be affected.

      drop table T;
       will drop external table T from Trafodion metadata. Underlying mapped HBase table will not be affected.

       If table T is specified in a DDL or DML statement without an explicit schema (like: drop table T, or select * from T
      ,or create table Tlike like T),
      then it will be first searched as a regular table in default regular schema. If not found, then it will be searched as a mapped table.
      So a regular table T will take precedence over a mapped table T.

      It is recommended that one does not create a regular table and a mapped table with the same name to avoid confusion.


      To limit the initial scope of this work, there will be some restrictions. Some of these may be lifted
      at a later time.
       insert, update and delete statements on mapped tables will not be initially supported.
       a mapped table cannot be aligned format table
       A primary key clause must be specified
       external and hbase mapped table names must be the same
       All non-primarykey and non-nullable columns must have a default value. This is needed to handle missing values
      in the underlying HBase table.
       creation of a Trafodion index on a mapped table will not be supported

      This proposal will be updated with additional syntax and semantics rules going forward.


          Issue Links



              • Assignee:
                anoopsharma Anoop Sharma
                anoopsharma Anoop Sharma
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: