You can determine the type of a SQL table, whether it has ACID properties, its storage format, such as ORC or Parquet, and other information. Knowing the table type is important for understanding how to store data in the table or how to completely remove data from the cluster.
-
Get an extended description of the table.
Hive example:
DESCRIBE EXTENDED `mydatabase`.`mytable`;
Impala example:
DESCRIBE EXTENDED mydatabase.mytable;
-
Scroll through the command output to see the table type.
The output says the table type is managed. The
transaction=true
indicates that the table has ACID
properties:
+------------------------------+---------------------------------------------------------
| name | type | comment
+------------------------------+---------------------------------------------------------
...
| Location: | s3a://cdpsaasdemo-cdp-private-default-1ogvplm/ | NULL
warehouse/tablespace/managed/hive/t3 | NULL
| Table Type: | MANAGED_TABLE | NULL
| Table Parameters: | NULL | NULL
| | OBJCAPABILITIES | NULL
| | transactional | true
| | transactional_properties | insert_only
...