You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
10
10
- Added support for the [PostgreSQL connector](https://trino.io/docs/current/connector/postgresql.html) using the new generic database connection mechanism.
11
11
Previously, users had to use the `generic` connector ([#883]).
12
12
- Added support for Trino 481 ([#900]).
13
+
- Add a new `.spec.name.inferred.replaceHyphensWithUnderscores` field on TrinoCatalog, which allows tweaking the catalog name in Trino ([#903]).
13
14
14
15
### Changed
15
16
@@ -43,6 +44,7 @@ All notable changes to this project will be documented in this file.
Copy file name to clipboardExpand all lines: docs/modules/trino/pages/usage-guide/catalogs/index.adoc
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,28 @@ In this case the `hive` and `iceberg` catalogs will be used as they both match t
105
105
106
106
A `TrinoCluster` can, once created, detect and use new catalogs that have been subsequently created with a matching label. This also means that it is possible to reuse a `TrinoCatalog` within multiple `TrinoClusters`.
107
107
108
+
=== Catalog name tweaking
109
+
110
+
By default the name of the catalog in Trino is inferred from the `.metadata.name` of the TrinoCatalog object.
111
+
This ensures that no catalog names clash, as their can only be one TrinoCatalog with a given name.
112
+
113
+
One inconvenience is that you need to quote catalogs (or schemas and tables for that matter) containing `-` in Trino, while `_` is fine.
114
+
As Kubernetes doesn't allow `_` in the object names, we offer a feature to replace `-` with `_`, which allows you to use valid Kubernetes names, but keeps the convenience of `_` in catalog names.
115
+
116
+
You can enable it like this, the Trino catalog will be called `my_postgres`:
117
+
118
+
[source,yaml]
119
+
----
120
+
kind: TrinoCatalog
121
+
metadata:
122
+
name: my-postgres
123
+
spec:
124
+
name:
125
+
inferred:
126
+
replaceHyphensWithUnderscores: true
127
+
# ...
128
+
----
129
+
108
130
=== Generic fallback connector
109
131
110
132
Trino supports lots of different connectors and we can not cover all the available connectors.
0 commit comments