Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Solved
Go to solution
Store intermediate Query Result to variable in Beeline-Hive
Labels:
- Labels:
-
Apache Hive
Rising Star
Created 09-16-2019 02:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to store intermediate query results in Beeline - Hive
something like below in pseudo code. within a beeline session
beeline -u -e"
set var1 = select max(date) from tableA;
set var2 = select count(emps) from tableB;
set var3 = select min(date) from tableC;
Insert into table TableD select var1, var2, var2
" --...
1 ACCEPTED SOLUTION
Super Guru
Created 09-16-2019 03:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ChineduLB
No you can't, you can only save data into temp tables, or simply use sub-query instead.
Cheers
Eric
No you can't, you can only save data into temp tables, or simply use sub-query instead.
Cheers
Eric
1 REPLY 1
Super Guru
Created 09-16-2019 03:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ChineduLB
No you can't, you can only save data into temp tables, or simply use sub-query instead.
Cheers
Eric
No you can't, you can only save data into temp tables, or simply use sub-query instead.
Cheers
Eric
