Question: how to create hql file in hive?
Answer: Step1: Writing a script. Open a terminal in your Cloudera CDH4 distribution and give the below command to create a Hive Script. command: gedit sample.sql. ...  Step 2: Execute the Hive Script. Execute the hive script using the following command: