This connector extracts metadata from Trino using Trino Python Client.
To run a Trino db instance locally, create the docker container with:
docker run --name trino -d -p 8080:8080 trinodb/trino
It comes with pre-populated data by default. To populate it with your own data, see this guide.
You must run the connector using a user with SELECT
privilege to the catalogs:
GRANT SELECT ON <catalogs> TO <user>
Create a YAML config file based on the following template.
You must specify the host, port, and the user in order to connect to Trino.
host: <host>
port: <port>
username: <username>
See Output Config for more information.
Currently password and JWT token based authentication methods are supported.
password: <password> # For basic authentication
token: <token> # For JWT token
password
takes precendence over token
. For locally running Trino instances for testing purposes, leave these 2 configuration values as unset to bypass authentication altogether.
See Trino doc for more information on authentication methods.
If your Trino instance has TLS enabled, set enable_tls
in the configuration file:
enable_tls: <enable_tls>
By default this value is set to False
.
See Trino doc for more information.
See Filter Config for more information on the optional filter
config.
By default the following are excluded:
- Catalog
system
- All schema called
information_schema
Follow the Installation instructions to install metaphor-connectors
in your environment (or virtualenv). Make sure to include either all
or trino
extra.
Run the following command to test the connector locally:
metaphor trino <config_file>
Manually verify the output after the run finishes.