Labels

Wednesday, March 23, 2022

How to handle the Incremental Data in Hive? (Class -14)

Incremental data is Dynamic data which is updated data receives on day-to-day basis.

We use VIEWS to handle the incremental data.

2 types of VIEWS:

a)      SIMPLE VIEW à creates view on single table.
b)    COMPLEX VIEW à creates view on multiple tables.


a)      a)    Do Simple View program:

Go to MySQL:



Show tables;


Select following data:


Let’s assume “ranking_data” is Production table.

Create a View on this Complex table.



Now Show Tables,

See you are seeing a Virtual table.



Now Update the record in this virtual VIEW:


Now Refreshed happened in Simple View:


b)  Complex View:

To Retrieve the Data from Multiple tables, use JOINS. You cannot perform DML operations in Complex View.





Join 2 Tables t1 & t2 using group by command;









No comments:

Post a Comment