Setting for insert/update on Hive table in hortonworks
To create insert/update table, a hive table has to be set up as a transactional table.
The properties you will need is below:
set
hive.support.concurrency=true;
set
hive.enforce.bucketing=true;
set
hive.exec.dynamic.partition.mode=nostrict;
set
hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
set
hive.compactor.initiator.on= true;
set
hive.compactor.worker.threads=2;
Hive table needs to be created as
following
CREATE TABLE `test.test_zyx1`(
`id` int,
`mm` int,
`data_as_of_dt` string,
`initial_dt` string )
CREATE TABLE `test.test_zyx1`(
`id` int,
`mm` int,
`data_as_of_dt` string,
`initial_dt` string )
stored as
orc tbl_properties("transactional=true")
No comments:
Post a Comment