Beeline Hive Command Options and Examples

  • Post author:
  • Post last modified:September 4, 2018
  • Post category:BigData
  • Reading time:4 mins read

You can run hive specific commands like Apache Hive Command options in Beeline shell. Just like in Hive command options, you can terminate Hive command by using “;” (semi colon). In this article, we will check Beeline Hive Command Options with some examples.

Read: Execute Hive Beeline JDBC String Command from Python

Beeline Hive Command Options and Examples

Beeline Hive Command Options

Below are the Beeline supported Hive command options:

Command Description
set <key>=<value> Sets the value of a configuration variable (key).
set -v This command prints all Hadoop and Hive configuration variables that are used.
set This command prints a list of configuration variables that are overridden by the user or Hive.
reset This command resets the system configuration to the default values.
reload This makes Hiveserver2 aware of the jar file changes (adding, removing or updating) that are specified in hive.reloadable.aux.jars.path. This option is available in Hive 0.14.0 onward.
list FILE[S]

list JAR[S]

list ARCHIVE[S]

Use this to lists the resources already added to the distributed cache.
list FILE[S] <filepath>*

list JAR[S] <filepath>*

list ARCHIVE[S] <filepath>*

Use this to checks whether the given resources are already added to the distributed cache or not.
dfs <dfs command> Executes a dfs command.
delete FILE[S] <ivyurl> <ivyurl>*

delete JAR[S] <ivyurl> <ivyurl>*

delete ARCHIVE[S] <ivyurl> <ivyurl>*

Removes the resource(s) which were added using the <ivyurl> from the distributed cache.
delete FILE[S] <filepath>*

delete JAR[S] <filepath>*

delete ARCHIVE[S] <filepath>*

Removes the resource(s) from the distributed cache.
add FILE[S] <ivyurl> <ivyurl>*

add JAR[S]<ivyurl> <ivyurl>*

add ARCHIVE[S] <ivyurl> <ivyurl>*

Add files, jars or archives to the list of resources in the distributed cache using an Ivy URL of the form ivy://group:module:version?query_string.
add FILE[S] <filepath> <filepath>*

add JAR[S] <filepath> <filepath>*

add ARCHIVE[S] <filepath> <filepath>*

Adds one or more files, jars, or archives to the list of resources in the distributed cache.
<query string> Executes a Hive query and prints results to standard output.

Beeline Hive Command Options Examples

Execute the Hive query on Beeline shell:

https://gist.github.com/19a89e43ff56e093dfa930f352b6f9b4

Related Readings: