Skip to content

Commit

Permalink
docs(trino): add details for connecting to starburst
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth committed Oct 16, 2023
1 parent 457534b commit 33855c2
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/backends/images/starburst_clusters.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/backends/images/starburst_connection_info.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 35 additions & 1 deletion docs/backends/trino.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,48 @@ from trino.auth import OAuth2Authentication

con = ibis.trino.connect(
user="user",
port=8080,
host="hostname",
port=443,
database="database",
schema="default",
auth=OAuth2Authentication(),
http_scheme="https"
)
```

### Connecting to Starburst managed Trino instances

Starburst makes use of role-based access controls. When connecting to a
Starburst Trino cluster, if you encounter issues listing or connecting to
tables, ensure that a role is specified using the `roles` keyword.

```python
import ibis
from trino.auth import OAuth2Authentication

con = ibis.trino.connect(
user="user",
host="hostname",
port=443,
database="sample",
schema="demo",
roles="defaultrolewithtableaccess",
auth=OAuth2Authentication(),
http_scheme="https"
)
```

#### Finding your Starburst `host`

Log into Starburst Galaxy and select `Clusters` from the left-hand-side menu:

![](./images/starburst_clusters.svg)

Select `Connection info` for the cluster you wish to connect to -- the username
and hostname displayed can be copied directly into the Ibis `connect` call.

![](./images/starburst_connection_info.svg)

```{python}
#| echo: false
BACKEND = "Trino"
Expand Down

0 comments on commit 33855c2

Please sign in to comment.