Search code examples
hive

How do we know if a table is managed table or external table?


In hive when I run show tables; I get the list of all the tables, how do I know which of these are managed tables and which are external tables?


Solution

  • You can use the following command to get details of specified table:

    describe formatted <your_table>;
    

    The output will contain a row describing table type:

    Table Type: EXTERNAL_TABLE

    or

    Table Type: MANAGED_TABLE