[Impala基础]-- Impala SQL语言参考(初步了解,CDH5.7以上版本)

初识Impala SQL语言

       之前一直使用Hive来实现业务,没有详细研究Impala!导致需要使用时才开始学习,昨天领导告诉我需要研究Impala,既然公司业务需要用,那作为开发人员的我们就尽可能地去学新东西来解决问题了。

        所以就先从看官方文档学起了,由于是菜鸟,水平有限,不足之处还请各位批评指正!

一、Impala使用SQL作为其查询语言,为了保护用户在技能开发和查询设计方面的投资,Impala提供了与Hive查询语言(HiveQL)的高度兼容性:

   1、因为Impala使用与Hive相同的元数据存储来记录有关表结构和属性的信息,Impala可以访问通过本机Impala CREATE TABLE命令定义的表,或使用Hive数据定义语言(DDL)创建的表。

   2、Impala支持类似于HiveQL的DML组件的数据操作(DML)语句。

   3、Impala提供了许多内置函数,其名称和参数类型与其HiveQL等同。

 

二、Impala支持大多数与HiveQL相同的语句和子句,包括但不限于FROM子句中的:

          JOIN,AGGREGATE,DISTINCT,UNION ALL,ORDER BY,LIMIT和(不相关)子查询

         备注:Impala也支持INSERT INTO和INSERT OVERWRITE

 

三、Impala支持与Hive数据类型具有相同名称和语义的数据类型:

      STRING,TINYINT,SMALLINT,INT,BIGINT,FLOAT,DOUBLE,BOOLEAN,STRING,TIMESTAMP

      备注:有关Impala SQL语法和语义的完整详细信息,请参见Impala SQL语句

 

四、大多数HiveQL SELECT和INSERT语句未经Impala运行

     备注:有关Impala中不可用的Hive语法的信息,请参阅Impala和Hive之间的SQL差异

 

六、有关Impala查询中可用的内置函数的列表,请参阅Impala内置函数

 

七、继续阅读:

      1、sql注释

      2、impala表的数据类型

      3、字段对应的文字值

      4、Sql操作符(如where、like、between等)

      5、模式对象与对象名称(比如Impala表分区:地址)

      6、SQL语句(impala-shell窗口中使用)

      7、内置函数

      8、Impala和Hive之间的SQL差异      

      9、移植SQL

 

原文:

 

Impala uses SQL as its query language. To protect user investment in skills development and query design, 
Impala provides a high degree of compatibility with the Hive Query Language (HiveQL):

Because Impala uses the same metadata store as Hive to record information about table structure and properties, 
Impala can access tables defined through the native Impala CREATE TABLE command, 
or tables created using the Hive data definition language (DDL).
Impala supports data manipulation (DML) statements similar to the DML component of HiveQL.

Impala provides many built-in functions with the same names and parameter types as their HiveQL equivalents.

Impala supports most of the same statements and clauses as HiveQL, including, but not limited to JOIN, AGGREGATE, DISTINCT, UNION ALL, ORDER BY, 
LIMIT and (uncorrelated) subquery in the FROM clause. Impala also supports INSERT INTO and INSERT OVERWRITE.

Impala supports data types with the same names and semantics as the equivalent Hive data types: STRING, TINYINT, SMALLINT, INT, BIGINT, FLOAT, DOUBLE, BOOLEAN, STRING, TIMESTAMP.

For full details about Impala SQL syntax and semantics, see Impala SQL Statements.

Most HiveQL SELECT and INSERT statements run unmodified with Impala. For information about Hive syntax not available in Impala, see SQL Differences Between Impala and Hive.

For a list of the built-in functions available in Impala queries, see Impala Built-In Functions.


Continue reading:

Comments
Data Types
Literals
SQL Operators
Schema Objects and Object Names
SQL Statements
Built-In Functions
SQL Differences Between Impala and Hive
Porting SQL


 

原文文章URL:http://www.cloudera.com/documentation/enterprise/latest/topics/impala_langref.html

 

 

 

    原文作者:highfei2011
    原文地址: https://blog.csdn.net/high2011/article/details/53230166
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞