Provides information about using Identifiers as the names of databases, tables, or columns when creating the objects.
The following rules apply to identifiers in Impala:
The minimum length of an identifier is 1 character.
The maximum length of an identifier is currently 128 characters, enforced by the Metastore database.
An identifier must start with an alphanumeric or underscore character. The remainder can contain any combination of alphanumeric characters and underscores.
Quoting the identifier with backticks has no effect on the allowed characters in the name.
An identifier can contain only ASCII characters.
To use an identifier name that matches one of the Impala reserved keywords, surround the identifier with
``characters (backticks). Quote the reserved word even if it is part of a fully qualified name.
The following example shows how a reserved word can be used as a column name if it is quoted with backticks in the
CREATE TABLEstatement, and how the column name must also be quoted with backticks in a query:
[localhost:21000] > create table reserved (`data` string); [localhost:21000] > select data from reserved; ERROR: AnalysisException: Syntax error in line 1: select data from reserved ^ Encountered: DATA Expected: ALL, CASE, CAST, DISTINCT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, STRAIGHT_JOIN, TRUE, IDENTIFIER CAUSED BY: Exception: Syntax error [localhost:21000] > select reserved.data from reserved; ERROR: AnalysisException: Syntax error in line 1: select reserved.data from reserved ^ Encountered: DATA Expected: IDENTIFIER CAUSED BY: Exception: Syntax error [localhost:21000] > select reserved.`data` from reserved; [localhost:21000] >
Impala identifiers are case-insensitive.