Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Who agreed with this solution

avatar
Rising Star

If this is from HUE, hue can execute multiple command in a sequence until it reaches the first query that returns results (like a select query). For example, the following should be executed entirely in a single go.

 

drop table if exists foo;
create table if not exists foo (code string, description string, salary int);
insert into foo select code, description, salary from sample s where s.salary > 50000 and s.salary < 100000;
select * from foo where salary < 75000;

 

The following will stop after the select query, so the drop table will not be executed.

drop table if exists foo;
create table if not exists foo (code string, description string, salary int);
insert into foo select code, description, salary from sample_07 s where s.salary > 50000 and s.salary < 100000;
select * from foo where salary < 75000;

drop table foo;

 

But if you use beeline to execute a file containing multiple select queries, this should work without pausing.

View solution in original post

Who agreed with this solution