#execute a query in Silent(S)Mode
- hive -S -e "your hive query"
#execute a query
- hive -e "your hive query"
#show current database
- hive>SET hive.cli.print.CURRENT.db=TRUE;
#show all column names for a table
- hive>SET hive.cli.print.header=TRUE;
#to run all pre required commands in one go
1.create .hiverc file in your root directory.
2.put all commands in .hiverc file.
Now all commands will run when you enter in to hive.
#run shell commands without exiting hive
- put ! before shell commands.
- hive> ! hadoop fs -ls ;
- hive> ! ls ;
#run a hql file in Hive CLI
- hive> SOURCE <location_Of/hql_File>
#run a hql file in unix:
- hive -f <location_Of/hql_File>
#you can save hive query file with extension .q or .hql;
What is bucketing and what is the use of it? Answer: Bucket is an optimisation technique which is used to ...