The purpose of this article is to explore interactive and non-interactive modes of execution of the SQL file to retrieve records from the Hive metastore through the command line interface.
Non-Interactive Mode:
The below command executes a SQL file in non-interactive mode. This type of execution is used for batch processing where no user’s input is required.
hive -f sample.sql
Interactive Mode:
The below command executes a SQL file in before entering interactive mode. Look at the below example, once the script is executed, it redirects to the interactive mode.
hive -i sample.sql
Hope you find this article helpful.
Please do follow for more interesting updates.
One comment