Database Reference
In-Depth Information
ALTER TABLE table_name
SET FILEFORMAT { PARQUETFILE | RCFILE |
SEQUENCEFILE | TEXTFILE }
Note
Chapter 7 , Advanced Impala Concepts , has detailed information on various file
formats supported in Impala.
Creating an empty table along with the partitioning scheme definition and altering the
table partition can be done using the following code:
CREATE TABLE table_name (def data_type)
PARTITIONED BY (partiton_name partition_type);
ALTER TABLE table_name ADD PARTITION
(partition_type='definition');
The DROP TABLE statement
When there is a need to remove the table from the database, you can use the DROP
TABLE command. The DROP command deletes the table and associated files un-
derneath in the HDFS directory, unless the table was created with the EXTERNAL
clause. Because the table and data cannot be recovered after deletion, it is sugges-
ted that you ensure you have the correct database in use before issuing the DROP
statement. The syntax for using DROP TABLE is as follows:
DROP TABLE [IF EXISTS] table_name;
The SHOW TABLES statement
When you want to see a list of all tables in a database, use the SHOW TABLE state-
ment with the following syntax:
Search WWH ::




Custom Search