Database Reference
In-Depth Information
| default |
| items |
+---------+
Returned 2 row(s) in 0.13s
[Hadoop.testdomain:21000] > drop database items;
Query: drop database items
ERROR: AnalysisException: Cannot drop current
default database: items
[Hadoop.testdomain:21000] > use default;
Query: use default
[Hadoop.testdomain:21000] > drop database items;
Query: drop database items
Note
The error with DROP is seen because we have items databases in use, so we
need to use some other database to free items database from use so that we
can remove it.
Table-specific statements
After looking at database-specific commands, we will now dig deeper to understand
some table-specific commands. Some of these commands also apply to the parti-
tions in the table, and when applicable I have used partitions and tables together in
my description and the examples in the following sections.
The CREATE TABLE statement
Because files are stored in a DataNode on the HDFS, tables in Impala work a little
differently. When you use the CREATE TABLE statement, Impala creates an intern-
al table where Impala manages the underlying data file for the table. When DROP
TABLE is called, the underlying file is physically deleted. The full create table state-
ment is as follows:
Search WWH ::




Custom Search