impala insert multiple rows

Solutions on MaxInterview for impala insert multiple rows by the best coders in the world

showing results for - "impala insert multiple rows"
Dario
06 May 2017
1[localhost:21000] > describe val_example;
2Query: describe val_example
3Query finished, fetching results ...
4+-------+---------+---------+
5| name  | type    | comment |
6+-------+---------+---------+
7| id    | int     |         |
8| col_1 | boolean |         |
9| col_2 | double  |         |
10+-------+---------+---------+
11
12[localhost:21000] > insert into val_example values (1,true,100.0);
13Inserted 1 rows in 0.30s
14[localhost:21000] > select * from val_example;
15+----+-------+-------+
16| id | col_1 | col_2 |
17+----+-------+-------+
18| 1  | true  | 100   |
19+----+-------+-------+
20
21[localhost:21000] > insert overwrite val_example values (10,false,pow(2,5)), (50,true,10/3);
22Inserted 2 rows in 0.16s
23[localhost:21000] > select * from val_example;
24+----+-------+-------------------+
25| id | col_1 | col_2             |
26+----+-------+-------------------+
27| 10 | false | 32                |
28| 50 | true  | 3.333333333333333 |
29+----+-------+-------------------+