Skip to content

Commit 7ddf953

Browse files
committed
Add Trino documentation: include connection string details and URL query parameters in README.md
1 parent 9ad3947 commit 7ddf953

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Database drivers run migrations. [Add a new database?](database/driver.go)
4444
* [Firebird](database/firebird)
4545
* [MS SQL Server](database/sqlserver)
4646
* [rqlite](database/rqlite)
47+
* [Trino](database/trino)
4748

4849
### Database URLs
4950

database/trino/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Trino
2+
3+
The Trino driver supports schema migrations for synchronizing databases connected via Trino, including data sources like Iceberg, Parquet, and S3. It is designed to handle schema changes, but its capabilities depend on the Trino configuration.
4+
5+
## Connection String
6+
7+
The connection string for Trino follows the format:
8+
9+
`trino://{user}@{host}:{port}?catalog={catalog}&schema={schema}&ssl=true`
10+
11+
### URL Query Parameters
12+
13+
| Parameter | Description |
14+
|---|---|
15+
| `catalog` | The name of the catalog to connect to. This catalog must already exist. |
16+
| `schema` | The name of the schema to use. This schema must already exist within the specified catalog. |
17+
| `ssl` | A boolean value (`true` or `false`) to enable or disable SSL. If not specified, it defaults to `true` (HTTPS). |
18+
| `x-migrations-table` | The name of the migrations table. Defaults to `schema_migrations`. |
19+
| `x-migrations-catalog`| The catalog where the migrations table is located. If not specified, the current catalog is used. |
20+
| `x-migrations-schema` | The schema where the migrations table is located. If not specified, the current schema is used. |
21+
| `x-statement-timeout` | The statement timeout in milliseconds. |
22+
23+
### Notes
24+
25+
- **Pre-existing Catalog and Schema**: The catalog and schema specified in the connection string must be created in Trino beforehand. The driver does not create them automatically.
26+
- **Schema Synchronization**: The primary purpose of this driver is to synchronize schemas across different databases connected through Trino. It is particularly useful for managing schema evolution in data lakes where data is stored in formats like Iceberg, Parquet, or on S3.
27+
- **Schema Changes**: Support for schema changes (e.g., `ALTER TABLE`) is dependent on the underlying connector and data source configuration in Trino.

0 commit comments

Comments
 (0)