Skip to content

Commit 4885d6c

Browse files
knethamotl
authored andcommitted
Trino: Implement suggestions by Kenneth
1 parent 2a7efb3 commit 4885d6c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/integrate/trino/tutorial.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ For example, on macOS you can `brew install trino`. Start the server with `trino
1111

1212
## Connector configuration
1313

14-
Because CrateDB speaks the PostgreSQL wire protocol, use Trino’s [PostgreSQL connector](https://trino.io/docs/current/connector/postgresql.html). Create a catalog properties file to configure the connection:
14+
Because CrateDB speaks the PostgreSQL wire protocol, you can use
15+
[Trino’s PostgreSQL connector]. Create a catalog properties file
16+
to configure the connection:
1517

1618
```ini
1719
connector.name=postgresql
@@ -43,7 +45,7 @@ Because CrateDB speaks the PostgreSQL wire protocol, use Trino’s [PostgreSQL c
4345
- macOS (Homebrew): `/usr/local/etc/trino/catalog/postgresql.properties` (or `/opt/homebrew/etc/trino/catalog/...` on Apple Silicon)
4446
- Linux (tarball/systemd): `$TRINO_HOME/etc/catalog/postgresql.properties` or `/etc/trino/catalog/postgresql.properties`
4547

46-
* Querying `OBJECT` columns: Columns of the data type `OBJECT` can usually be queried using the bracket notation, e.g. `SELECT my_object_column['my_object_key'] FROM my_table`. In Trino’s SQL dialect, the identifier needs to be wrapped in double quotes, such as `SELECT "my_object_column['my_object_key']" FROM my_table`.
48+
* Querying `OBJECT` columns: Columns of the data type `OBJECT` can usually be queried using the bracket notation e.g., `SELECT my_object_column['my_object_key'] FROM my_table`. In Trino’s SQL dialect, the identifier needs to be wrapped in double quotes, such as `SELECT "my_object_column['my_object_key']" FROM my_table`.
4749
* `INSERT` queries: When inserting, Trino addresses tables with `catalog_name.schema_name.table_name`, which currently isn't supported by CrateDB. Please see [crate/crate#12658](https://github.com/crate/crate/issues/12658) on addressing this issue.
4850
* Data types: Not all of Trino’s [data types](https://trino.io/docs/current/language/types.html) can be mapped to CrateDB data types and vice versa.
4951
* For creating tables, it can be advisable to run the `CREATE TABLE` statement directly in CrateDB. This approach is also recommended if you want to configure custom table settings, such as sharding, partitioning, or replication.
@@ -56,3 +58,6 @@ Because CrateDB speaks the PostgreSQL wire protocol, use Trino’s [PostgreSQL c
5658
With a few parameter tweaks, Trino connects to CrateDB. This guide reflects a
5759
short compatibility test and is not exhaustive. If you discover additional
5860
aspects, please let us know.
61+
62+
63+
[Trino’s PostgreSQL connector]: https://trino.io/docs/current/connector/postgresql.html

0 commit comments

Comments
 (0)