Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.49 KB

README.md

File metadata and controls

51 lines (38 loc) · 1.49 KB

viewzoo

This Trino connector stores logical view definitions on the coordinator filesystem, without any dependencies on external databases or object storage.

CodeFactor Contributing License

Dependencies

  • Java 23
  • Trino 464

Configuring Local Environment

1. Install Trino
download and expand tarball to local directory
export TRINO_HOME=$HOME/...

2. Create $TRINO_HOME/etc/catalog/viewzoo.properties:
connector.name=viewzoo
viewzoo.views.dir=/tmp/viewzoo

3. Build the connector and redeploy
mvn clean package && rm -rf $TRINO_HOME/plugin/viewzoo /tmp/viewzoo && cp -r ./target/viewzoo-464 $TRINO_HOME/plugin/viewzoo && mkdir -p /tmp/viewzoo

4. Start Trino
cd $TRINO_HOME
bash bin/launcher run

Defining and Using Views

Create a view with a static result set:

create or replace view viewzoo.example.hello as select * from (values (1, 'a'), (2, 'b'), (3, 'c')) as t (key, value)

Select rows from the view:

select * from viewzoo.example.hello

Delete the view:

drop view viewzoo.example.hello

© 2024 Rob Dickinson (robfromboulder)