[
https://issues.apache.org/jira/browse/HIVE-6905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13970362#comment-13970362
]
Pardeep Kumar commented on HIVE-6905:
-------------------------------------
For auto-increment, Hive needs to have a sequence table in the database which
should hold an incrementing sequence values. Below schema for the sequence
table can be used.
Property Description Required
key-initial-value First value to be allocated. No. Defaults to 1
key-cache-size number of unique identifiers to cache. The keys are
pre-allocated, cached and used on demand.
sequence-table-basis Whether to define uniqueness on the base class name or
the base table name. Since there is no "base table name" when the root class
has "subclass-table" this should be set to "class" when the root class has
"subclass-table" inheritance No. Defaults to class, but the other option is
table
sequence-name name for the sequence (overriding the "sequence-table-basis"
above). The row in the table will use this in the PK column No
sequence-table-name Table name for storing the sequence. No. Defaults to
SEQUENCE_TABLE
sequence-catalog-name Name of the catalog where the table is. No.
sequence-schema-name Name of the schema where the table is. No.
sequence-name-column-name Name for the column that represent sequence
names. No. Defaults to SEQUENCE_NAME
sequence-nextval-column-name Name for the column that represent incremeting
sequence values. No. Defaults to NEXT_VAL
table-name Name of the table whose column we are generating the value for
(used when we have no previous sequence value and want a start point. No.
column-name Name of the column we are generating the value for (used when
we have no previous sequence value and want a start point.
> Implement Auto increment, primary-foreign Key, not null constraints and
> default value in Hive Table columns
> ------------------------------------------------------------------------------------------------------------
>
> Key: HIVE-6905
> URL: https://issues.apache.org/jira/browse/HIVE-6905
> Project: Hive
> Issue Type: New Feature
> Components: Database/Schema
> Reporter: Pardeep Kumar
>
> For Hive to replace a modern datawarehouse based on RDBMS, it must have
> support for keys, constraints, auto-increment values, surrogate keys and not
> null features etc. Many customers do not move their EDW to Hive due to these
> reasons as these have been challenging to maintain in Hive.
> This must be implemented once https://issues.apache.org/jira/browse/HIVE-5317
> for Updates, Deletes and Inserts are done in Hive. This should be next stop
> for Hive enhancement to take it closer to a very wide mainstream adoption..
--
This message was sent by Atlassian JIRA
(v6.2#6252)