- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to create hive table as non-transactional, by default?
- Labels:
-
Apache Hive
Created on ‎03-07-2022 06:08 PM - edited ‎03-07-2022 07:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using HDP hive-3.1.
My configuration as follows:
hive.support.concurrency=true;
hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; hive.exec.dynamic.partition.mode=nonstrict;
hive.compactor.initiator.on=true;
hive.compactor.worker.threads=2;
By default, transactional table is created in hive.
however, i want to create non-transactional table , by default. I tried to change hive.txn.manager to Dummymanager. Though after changing the configuration, hive table is created as transactional.
any suggestion to create non-transactional table, be default?
Created ‎03-08-2022 01:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think this is possible. At least, I couldn't find a way to revert the default behaviour.
The default behaviour is:
- Managed tables are created as transactional by default
- External table are created as non-transactional by default
If you want anything different from the above you have to explicitly specify the transactional property in the TBLPROPERTIES clause.
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created ‎03-08-2022 04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
check hive.default.fileformat and hive.default.fileformat.managed properties
Created ‎03-11-2022 03:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @na2_koihey11 ,
We're also using HDP 3.1 and we are able to create non-transactional tables by default by setting hive.default.fileformat.managed to TextFile.
Thanks,
Megh
Created ‎03-11-2022 03:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We've set this property in advanced hive-site section
Created ‎03-13-2022 05:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hive.default.fileformat.managed = ORC
hive.default.fileformat = TextFile
we tried to change hive.default.fileformat.managed to TextFile, still it doesn't work.
Could you please check how it works for you.
Created ‎03-08-2022 01:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think this is possible. At least, I couldn't find a way to revert the default behaviour.
The default behaviour is:
- Managed tables are created as transactional by default
- External table are created as non-transactional by default
If you want anything different from the above you have to explicitly specify the transactional property in the TBLPROPERTIES clause.
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created on ‎03-08-2022 05:53 PM - edited ‎03-08-2022 05:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@araujo Is there any official documentation, which states the statement as mentioned by you. I would like to study more in detail.
Created ‎03-08-2022 06:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, there is! Please take a look at the page below:
https://docs.cloudera.com/runtime/7.2.10/using-hiveql/topics/hive_hive_3_tables.html
Cheers,
André
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.
