Thursday, February 10, 2022

Difference between Managed table and External table

 



Difference 

1. In Managed table both the data & schema in under control to hive

In External table only schema is under control to hive 


2. Managed table syntax : 

Create table table_name (col datatype, col2 datatype,..,coln datatype)

row format delimited 

fields terminated by ' '

stored as textfile;

External table syntax:

Create external table table_name (col datatype, col2 datatype,..,coln datatype)

row format delimited 

fields terminated by ' '

stored as textfile;


3. Managed table will drop then data and metadata removed, which means underlying HDFS data will also be deleted along with metadata.

External table will drop then it remove only the metadata, which means underlying HDFS directory will remain intact.


Videos: https://www.youtube.com/watch?v=XbuWg-JRYT0&list=PLVt87wOZJLOdtvKLe6X846CbuFNKOX95E



No comments:

Post a Comment

2 Basic Python Program

  2 Basic Python Program : 1. Read and display user Inputs in Python Program  2.  Sum And Average of float numbers  using Python Program    ...