Update readme with connection example
This commit is contained in:
parent
738c451518
commit
6cefb7ed03
1 changed files with 13 additions and 0 deletions
13
README.md
13
README.md
|
|
@ -36,6 +36,19 @@ lolaconfig = build_lolaconfig(
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Connect to a Trino server**
|
||||||
|
|
||||||
|
```python
|
||||||
|
from lolafect.connections import connect_to_trino, close_trino_connection
|
||||||
|
|
||||||
|
connection = connect_to_trino.run(
|
||||||
|
trino_credentials=my_trino_credentials #You can probably try to fetch this from lolaconfig.TRINO_CREDENTIALS
|
||||||
|
)
|
||||||
|
connection.cursor().execute("SELECT 1")
|
||||||
|
close_trino_connection.run(trino_connection=connection)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
**Send a warning message to slack if your tasks fails**
|
**Send a warning message to slack if your tasks fails**
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue