- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
how to run .hql scripts from beeline prompt
- Labels:
-
Apache Hive
Created ‎01-27-2017 04:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Can you give me the steps for running the .hql scripts from beeline prompt?
i get below error.
0: jdbc:hive2://> source /home/local/hive/p.hql;
NoViableAltException(26@[])
at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1079)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
****************
i am comfortable with below command and it works
1) hive> source /home/local/hive/p.hql;
OK
table_1
table_2
Time taken: 0.231 seconds, Fetched: 2 row(s)
hive>
2) beeline -u jdbc:hive2://xxxxxxxxxx:10000/default -n hive -p hive -f /home/local/hive/st.hql >> out.txt
3) $HIVE_HOME/bin/hive -f /home/local/hive/st.hql --database default > out.txt
Created ‎01-27-2017 09:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎01-27-2017 09:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
