0
0
Hadoopdata~10 mins

External vs managed tables in Hadoop - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a managed table in Hive.

Hadoop
CREATE TABLE employees (id INT, name STRING) [1] PARQUET;
Drag options to blanks, or click blank then click option'
ASTORED AS
BEXTERNAL
CLOCATION
DPARTITIONED BY
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXTERNAL keyword when creating a managed table.
Specifying LOCATION without EXTERNAL keyword.
2fill in blank
medium

Complete the code to create an external table in Hive.

Hadoop
CREATE [1] TABLE logs (event STRING) LOCATION '/data/logs';
Drag options to blanks, or click blank then click option'
AGLOBAL
BMANAGED
CTEMPORARY
DEXTERNAL
Attempts:
3 left
💡 Hint
Common Mistakes
Using MANAGED keyword for external tables.
Omitting EXTERNAL keyword but specifying LOCATION.
3fill in blank
hard

Fix the error in the code to drop an external table without deleting data.

Hadoop
DROP TABLE [1] logs;
Drag options to blanks, or click blank then click option'
APURGE
BIF EXISTS
CEXTERNAL
DCASCADE
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXTERNAL keyword in DROP TABLE statement.
Using PURGE which deletes data files.
4fill in blank
hard

Fill both blanks to create an external table with a specified location.

Hadoop
CREATE [1] TABLE sales (id INT, amount FLOAT) [2] '/user/data/sales';
Drag options to blanks, or click blank then click option'
AEXTERNAL
BSTORED AS
CLOCATION
DPARTITIONED BY
Attempts:
3 left
💡 Hint
Common Mistakes
Using STORED AS instead of LOCATION for data path.
Omitting EXTERNAL keyword for external tables.
5fill in blank
hard

Fill the blanks to create a managed table stored as ORC format.

Hadoop
CREATE TABLE inventory (item STRING, qty INT) [1] ORC [2];
Drag options to blanks, or click blank then click option'
AMANAGED
BSTORED AS
CTBLPROPERTIES ('transactional'='true')
DEXTERNAL
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXTERNAL keyword for managed tables.
Omitting TBLPROPERTIES for transactional tables.