--Create hive table

While Importing data using SQOOP to a table in hive by giving --Create table …the table will be created as Managed or external???

i think you can do a describe formatted table_name;
to get the details of the table .

That’s Cool. I guess I was not specific.
sqoop import create-hive-table --connect jdbc:mysql://localhost:3306/Deepak–table dpk

Is there any rule that dpk will be managed or External?
what’s the by default behaviour manged or external??

There are two types of tables in Hive ,one is Managed table and second is external table.
the difference is , when you drop a table, if it is managed table hive deletes both data and meta data,if it is external table Hive only deletes metadata.
Now we learn few things about these two

  1. Table Creation

by default It is Managed table .
If you want to create a external table ,you will use external keyword.

for example assume you have emp.csv file under directory /data/employee

to create a managed table we use normal syntax like below

create table managedemp(col1 datatype,col2 datatype, …) row format delimited fields terminated by 'delimiter character’
location ‘/data/employee’

but to create external table ,we use external keyword like below

create external table managedemp(col1 datatype,col2 datatype, …) row format delimited fields terminated by 'delimiter character’
location ‘/data/employee’

Article reference :- http://www.hadooplessons.info/2014/12/managed-table-and-external-table-in-hive.html

Thanks Tarun for replying to my query.
I really Appreciate your patience over my question and describing it into detailed one.

SO basically if we are importing a table in hive using sqoop the table will by default managed table.

correct me if i am wrong?

You are right by default managed table gets created