HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

hive — Tool for Apache Hive. More information: <https://cwiki.apache.org/confluence/display/Hive/LanguageMa

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandcliapachemoretoolhivefor

Problem

How to use the hive command: Tool for Apache Hive. More information: <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Cli>.

Solution

hive — Tool for Apache Hive. More information: <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Cli>.

Start a Hive interactive shell:
hive


Run HiveQL:
hive -e "{{hiveql_query}}"


Run a HiveQL file with a variable substitution:
hive {{[-d|--define]}} {{key}}={{value}} -f {{path/to/file.sql}}


Run a HiveQL with HiveConfig (e.g. mapred.reduce.tasks=32):
hive --hiveconf {{conf_name}}={{conf_value}}

Code Snippets

Start a Hive interactive shell

hive

Run HiveQL

hive -e "{{hiveql_query}}"

Run a HiveQL file with a variable substitution

hive {{[-d|--define]}} {{key}}={{value}} -f {{path/to/file.sql}}

Run a HiveQL with HiveConfig (e.g. `mapred.reduce.tasks=32`)

hive --hiveconf {{conf_name}}={{conf_value}}

Context

tldr-pages: common/hive

Revisions (0)

No revisions yet.