Skip to content

Trino connector for lightweight storage of logical views

License

Notifications You must be signed in to change notification settings

robfromboulder/viewzoo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Trino connector for lightweight storage of logical views

Resources

License

Stars

Watchers

Forks

Languages