Skip to content

Instantly share code, notes, and snippets.

@agrawalreetika
Last active March 3, 2020 12:46
Show Gist options
  • Save agrawalreetika/34df30675696dd40b3a4497efb606623 to your computer and use it in GitHub Desktop.
Save agrawalreetika/34df30675696dd40b3a4497efb606623 to your computer and use it in GitHub Desktop.
Steps to query through presto-cli.
[root@presto-coordinator ~]$ presto
presto> create schema hive.test_db;
presto> CREATE TABLE hive.test_db.lineitem (
orderkey bigint NOT NULL,
partkey bigint NOT NULL,
suppkey bigint NOT NULL,
linenumber integer NOT NULL,
quantity double NOT NULL,
);
presto> INSERT INTO TABLE hive.test_db.lineitem VALUES ((1,1552,93,1,17.0),(1,674,75,2,36.0));
presto> select * from hive.test_db.lineitem limit 2;
orderkey | partkey | suppkey | linenumber | quantity
----------+---------+---------+------------+----------
1 | 1552 | 93 | 1 | 17.0
1 | 674 | 75 | 2 | 36.0
(2 rows)
Query 20191222_154658_00002_igzun, FINISHED, 1 node
Splits: 18 total, 18 done (100.00%)
0:01 [3 rows, 1.38MB] [2 rows/s, 1.34MB/s]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment