A Trino connector for reading Lance format data. This connector allows Trino to query Lance datasets directly.
Create a catalog properties file (e.g., etc/catalog/lance.properties):
| Property | Description | Default |
|---|---|---|
lance.impl |
Namespace implementation: dir, rest, glue, hive2, hive3, or full class name |
dir |
lance.connection_timeout |
Connection timeout duration | 1m |
lance.connection_retry_count |
Number of retries for failed connections | 5 |
Any other lance.* properties are stripped of the lance. prefix and passed to the namespace implementation.
connector.name=lance
lance.impl=dir
lance.root=/path/to/warehouse
lance.storage.timeout=30s
lance.storage.retry-count=3connector.name=lance
lance.impl=rest
lance.uri=https://api.lancedb.com
lance.tls.enabled=true
lance.header.Authorization=Bearer <token>Once configured, you can query Lance data using SQL:
-- List schemas
SHOW SCHEMAS FROM lance;
-- List tables
SHOW TABLES FROM lance.default;
-- Describe table schema
DESCRIBE lance.default.my_dataset;
-- Query a Lance dataset
SELECT * FROM lance.default.my_dataset;
-- Query with filtering and projection
SELECT id, name, value
FROM lance.default.my_dataset
WHERE value > 100
ORDER BY id
LIMIT 10;
-- Aggregations
SELECT category, COUNT(*), AVG(value)
FROM lance.default.my_dataset
GROUP BY category;Build the connector:
make installOther available commands:
make help # Show all available commands
make build # Compile and package
make test # Run tests
make compile # Compile only
make package # Package without tests
make clean # Clean build artifacts
make verify # Full verification
make run # Run development server
make lint # Run code style checks (checkstyle, modernizer, sortpom)
make format # Format pom.xml files
make check # Run all checks without tests- Build the connector using Maven
- Copy the generated plugin directory from
plugin/trino-lance/target/trino-lance-<version>/to your Trino plugins directory (e.g.,/usr/lib/trino/plugin/lance/) - Configure the connector in your Trino catalog properties
- Restart Trino
Everything in this repository apart from the plugin/trino-lance mimics the layout of the Trino project.
For example, the root pom file is a copy of the Trino root pom file with exactly the same content.
We periodically upgrade the Trino version to stay up to date with the latest Trino features.
make testYou can run a local Trino server for development:
make runThis starts a Trino server on port 8080 with the Lance connector configured.
- Java 23 or later
- Trino 476 or compatible version
Apache License 2.0