Hive supports multiple databases, hive defaults to the default database, each database is an HDFs directory, default is special, located in the hive storage root, the other new databases are located in the root subdirectory, the subdirectory name is the database name.
By default, the hive CLI does not display the current database, but hive provides a property: Hive.cli.print.current.db=true; To set the print current database name. There are 2 ways to set it up:
1, when needed, immediate configuration, in the CLI execution of property settings, this configuration, when the CLI is reopened, it will take effect:
Hive> set hive.cli.print.current.db=true;
2, once configuration, permanent, in the current user's home directory, create a new. hiverc file, put the property settings command into the file, each time you open the CLI, the file will be executed first.
3, effect.
Hive (default) >