Hive supports all ACID properties which enable us to use transactions, create transactional tables, and run queries like Insert, Update, and Delete on tables.
A à Atomicity (an operation either succeeds completely or fails, it does not leave
partial data)
C à Consistency (once an application performs an operation the results of that operation
are visible to it in every subsequent operation),
I à Isolated (an incomplete operation by one user doesn’t cause unexpected side
effects for other users)
D à Durability (once an operation is complete it will be preserved even in the face of
machine or system failure).
Acid Properties can be done on Internal tables not External.
We can do
DML (Insert, Delete & Update) operations in Hive if version is greater than
> 0.13.
To perform DML Operations, Certain conditions need to be followed in ACID properties:
a) Bucketed table
Create Hive table in bucketed format following ORC properties:
See above
table is created in 3 Buckets form stored in ORC file format and transactional
property is true.
a)
Now do the Insert operations,
Now Update record in Hive:
Now Delete
a file from Hive:
Go to Default path whether in Cloudera / Cloudxlab:
For every transaction, One Delta File will be created.
No comments:
Post a Comment