When To Use External Table And Internal Table In Hive

Our HadoopTpoint App is now available in google play store,please rate and comment it in play store : W3Schools

We can create table in hive in two different approaches,one approach is hive external table and another approach is hive managed table.In this post we explained the detailed information about Hive create table and real time examples of hive create tables. Here is the two types of hive table .

i) Hive External Table

ii) Hive Managed Table

Please Subscribe To Our YouTube Channel For More Hadoop Videos  

https://www.youtube.com/channel/UCyelkhqpMYERfpNfmOf8MCw

create internal table in hive

create external table in hive

If you want to know more information about hive create table examples and load data into external table and managed table examples refer our previous post   hive create table examples.

But in real time of using hive we have to aware of When To Use External Table  And Internal Table In Hive at that time only you can process and complete the task successfully.

When To Use External Table And Internal Table In Hive

When To Use External Table And Internal Table In Hive

When To Use External Table  And Internal Table In Hive

when to use internal table in hive

  • Data is temporary (Testing Data)

  • Hive to Manage the table data completely not allowing any external source to use the table (external sources means sqoop,pig,mapreduce)

  • Don’t want data after deletion

when to use External table in hive

  • The data is also used outside of Hive. For example, the data files are read and processed by an existing program that doesn’t lock the files (other eco systems like pig,sqoop.mapreduce etc also worked on same data at a same time)

  • Hive should not own data and control settings, dirs, etc., you have another program or process that will do those things

  • You are not creating table based on existing table (AS SELECT)

  • Can create table back and with the same schema and point the location of the data

This is the main concept of When To Use External Table  And Internal Table In Hive .If you have any queries or want to add your tip, let me know via comments and please share and subscribe to our website.

Speak Your Mind

*