Actual combat-Hive CLI command-line tool displays the current database by default

Source: Internet
Author: User

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) >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.