Schema names in Hive Metastore (HMS) that are NPS reserved keywords
If there are schema names in Hive Metastore that are NPS keywords, you cannot use those keywords as identifiers when using the schema in:
SET SCHEMA <name>
or cross schema reference in:
SELECT col from <schema_name>.<tablename>
For these use cases, these schema names must be quoted in double quotation marks to be used as identifiers.
For example:
default is a NPSaaS keyword and it is a schema name in HMS. To use it in SET SCHEMA command:
- Reference the schema name in double quotes by using the system case, usually written in uppercase.
SET SCHEMA "DEFAULT"
- Alternatively, reference the schema name in double quotes with carets to convert to system case.
SET SCHEMA "^default^";
For more information on NPSaaS keywords, see SQL reserved words and keywords.