Run the following commands from your Trino client to confirm that the connector is correctly set up:
List Trino catalogs:
trino> SHOW CATALOGS;
The output should include a catalog named
vast:Catalog --------- <...> vast <...>
List schemas in the
vastcatalog:trino> SHOW SCHEMAS FROM vast;
The output should include the database and the schema you created when configuring the VAST cluster:
Schema -------------------- <...> vastdb/schema1 <...>
List tables in schema
vastdb/schema1:trino> SHOW TABLES FROM vast."vastdb/schema1";
If you did not create any tables in the schema, the command completes but the output shows no tables.
(Optional) Set
vastdb/schema1as the default namespace for this session. This allows you to omit specifying the catalog and schema in the following steps.trino> USE vast."vastdb/schema1";
Create a table in schema
vastdb/schema1:trino:vastdb/schema1> CREATE TABLE cats (weight BIGINT, name VARCHAR, attitude REAL, date DATE, time TIMESTAMP);
List columns in the newly created table:
trino:vastdb/schema1> DESCRIBE cats;
The output should show the columns:
Column | Type | Extra | Comment ----------+--------------+-------+--------- weight | bigint | | name | varchar | | attitude | real | | date | date | | time | timestamp(3) | | (5 rows)
Add data to the newly created table:
trino:vastdb/schema1> INSERT INTO cats (weight, name, attitude, date, time) VALUES (14, 'jeff', 2.5, date('2022-12-07'), now());Run a transaction:
trino:vastdb/schema1> START TRANSACTION; INSERT INTO cats ( weight, name, attitude, date, time ) VALUES ( 12, 'happy', 18.7, date('2022-12-02'), now() ); INSERT INTO cats ( weight, name, attitude, date, time ) VALUES ( 8, 'joy', 19.2, date('2022-12-02'), now() ); INSERT INTO cats ( weight, name, attitude, date, time ) VALUES ( 11, 'chester', 13.2, date('2022-12-02'), now() ); COMMIT;List table rows:
trino:vastdb/schema1> SELECT * FROM cats;
The output should contain the following rows:
weight | name | attitude | date | time --------+---------+----------+------------+------------------------- 14 | jeff | 2.5 | 2022-12-07 | 2022-12-08 19:50:51.471 12 | happy | 18.7 | 2022-12-02 | 2022-12-08 19:55:35.325 8 | joy | 19.2 | 2022-12-02 | 2022-12-08 19:55:36.390 11 | chester | 13.2 | 2022-12-02 | 2022-12-08 19:55:37.180 (4 rows)
Verify that you can view a query execution plan:
trino:vastdb/schema1> EXPLAIN SELECT * FROM cats WHERE weight > 10 AND attitude < 10;