How do you save the Hive query results in a table?
I am not sure whether i have understood your question correctly. Is it something like you need to store the Hive output into a table ?
If yes, May be, you can refer Lecture 58 : Sqoop Export - Update and Upsert in Durga Sir video(Using Pyspark).
Create table in mysql:
create table daily_revenue(order_date varchar(30) primary key, revenue float);
Moving from Hive into SQL table
No, that 's not what I am asking. What I meant was that let’s say you write a query in HIVE and do all the data manipulation and you want to send the results of the query to HDFS directly. Do you always have to create a table first using ‘select as’ option or is there a direct way you can send the results of the query to HDFS. In such case (when you manipulate the data in query), is view a better option?
For example, I made data manipulation in hotel_review table and results are shown below,
Then i would like to store the query result from Hive into a HDFS as shown below,
Then i would see the results as shown below,
Yes, that’s what I was asking. Thanks for the help!