Database Reference
In-Depth Information
• Data types, that is int , tinyint , smallint , bigint , float , double ,
boolean , string , and timestamp , in Impala share the same name and
semantics as Hive for the supported data types.
Now, let's take a quick look at how the Impala Query Language supports HiveQL;
note the following key points:
• Impala statements and clauses are similar to those of HiveQL, such as JOIN ,
UNION ALL , ORDERBY , LIMIT , DISTINCT , and AGGREGATE
• Impala statements support data manipulation statements similar to the Data
Manipulation Language ( DML )
SELECT and INSERT statements in Impala function the same as in HiveQL
• Impala also supports INSERT INTO and INSERT OVERWRITE statements
• Several built-in functions in various categories such as mathematical, condi-
tional, or string are the same in Impala and HiveQL and use the same name
and parameter types
We must understand that not every SQL statement is supported in Impala. To make
it simple, a list of unsupported SQL statements is at the end of this chapter. Now, let's
get to know the most useful SQL language statements, which are commonly used in
Impala.
Impala SQL language statements
With Impala, users can work on various types of data through databases, tables, and
views. Impala uses these SQL statements to process data stored in databases and
tables, and in the next several sections we will study Impala statements using some
examples. Databases and the table metadata is modified differently in both Hive and
Impala. In Hive, you can use ALTER , CREATE , DROP , or INSERT operations to modify
the data; however, in Impala, you will have to use CREATE TABLE , ALTER TABLE ,
and INSERT operations to achieve the same objective. Let's start with Database-
specific SQL statements:
Database-specific statements
Let's first understand what a database is:
Search WWH ::




Custom Search