Created 09-02-2016 10:51 AM
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.