Complete the code to create a managed table in Hive.
CREATE TABLE employees (id INT, name STRING) [1] PARQUET;The STORED AS clause specifies the file format for a managed table in Hive.
Complete the code to create an external table in Hive.
CREATE [1] TABLE logs (event STRING) LOCATION '/data/logs';
The EXTERNAL keyword creates an external table that points to data stored outside Hive's control.
Fix the error in the code to drop an external table without deleting data.
DROP TABLE [1] logs;Using IF EXISTS avoids errors if the table does not exist. Dropping an external table does not delete data by default.
Fill both blanks to create an external table with a specified location.
CREATE [1] TABLE sales (id INT, amount FLOAT) [2] '/user/data/sales';
External tables require the EXTERNAL keyword and the LOCATION clause to specify data path.
Fill the blanks to create a managed table stored as ORC format.
CREATE TABLE inventory (item STRING, qty INT) [1] ORC [2];
Managed tables are created using CREATE TABLE. The format is set with STORED AS. Table properties can enable transactions.