在 impala 数据库名称中使用连字符
Use hyphen in impala database name
我有一个脚本,它直接要求在数据库名称中使用连字符创建 impala 数据库。
我无法使用以下命令在 impala shell 中执行相同的操作。
******** default> create database test-1;
Query: create database test-1
ERROR: AnalysisException: Invalid database name: test-1
连反勾也无济于事
******** default> create database `test-1`;
Query: create database `test-1`
ERROR: AnalysisException: Invalid database name: test-1
不幸的是,根据 Cloudera 的 Impala documentation,这听起来不可能:
o 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.
我有一个脚本,它直接要求在数据库名称中使用连字符创建 impala 数据库。
我无法使用以下命令在 impala shell 中执行相同的操作。
******** default> create database test-1;
Query: create database test-1
ERROR: AnalysisException: Invalid database name: test-1
连反勾也无济于事
******** default> create database `test-1`;
Query: create database `test-1`
ERROR: AnalysisException: Invalid database name: test-1
不幸的是,根据 Cloudera 的 Impala documentation,这听起来不可能:
o 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.