Support Questions

Find answers, ask questions, and share your expertise

Hive view definition update

avatar
New Contributor

some of our views are created as "create view {view_name} as select * from {base_table}"

 

Now, if the base table definition gets updated (by adding new attributes), does hive view definition gets auto updated? Or do we need to recreate the view?

 

As per documentation from https://cwiki.apache.org/confluence/display/Hive/ViewDev, hive uses Stored view definition. Is this true for Hive version 1.1 as well?

1 ACCEPTED SOLUTION

avatar
Champion

@HarishS

 

Any DML changes will be reflected automatically. But you need to run the below replace command to reflect DDL changes in view

 

CREATE OR REPLACE VIEW View_Name as query;

View solution in original post

2 REPLIES 2

avatar
Champion

@HarishS

 

Any DML changes will be reflected automatically. But you need to run the below replace command to reflect DDL changes in view

 

CREATE OR REPLACE VIEW View_Name as query;

avatar
Explorer

If I have 50 users. 10 users are updating and inserting the same base table  simultaneusly and 40 users are just querying simultaneously, will there be any locking? How is the concurrency working?

 

I do not want to turn on the transactional or ACID features. Please let me know.

 

Thanks,

Raja