Home >> Big Data Hadoop >> Hive CLI Options in Big Data Hadoop

Hive CLI Options in Big Data Hadoop

* Running a Query from the command line:

     $HIVE_HOME/bin/hive -e 'select a.col from tab1 a'

* Setting hive configuration variables

     $HIVE_HOME/bin/hive -e 'select a.col from tab1 a' -hiveconf hive.exec.scratchdir=/home/my/hive_scratch  -hiveconf mapred.reduce.tasks=32

* Dumping data out from a query into a file using silent mode

     $HIVE_HOME/bin/hive -S -e 'select a.col from tab1 a' > a.txt

* Running a script non-interactively

$HIVE_HOME/bin/hive -f /home/my/hive-script.sql

* Running initialization script before entering interactive mode

$HIVE_HOME/bin/hive -i /home/my/hive-init.sql

 

  

Post Your Comment

Next Questions
Hive shell commands
Hive Logging & Resources
Hive Types Of Joins
Hive Joins
Hive Joins cont
Hive Built-in Operators
Hive Data Types
Hive Built-in Functions
Hive Explode
Hive SORT BY vs ORDER By
HIve DISTRIBUTE BY vs CLUSTER BY
Hive HUE Editor
Hive vs Impala
Hive Data & Schema
Hive Partitioning
Hive Bucketing
Hive File Format
Hive Engine
Hive Vectorization
Hive User Defined Function
Hive How to Write a User Defined Function
Hive User Defined Aggregate Functions
Hive Performance Tuning
Hive Rank and Over
Hive SERDE

Copyright ©2022 coderraj.com. All Rights Reserved.