File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,21 @@ To override the API URL (e.g. for dev testing):
4040export FIREBOLT_BASE_URL=< your_url>
4141```
4242
43+ If your password contains % or / characters they need to be sanitised as per https://docs.sqlalchemy.org/en/14/core/engines.html#database-urls
44+ ``` python
45+ my_pass = " 0920%/2"
46+ import urllib.parse
47+ new_pass = urllib.parse.quote_plus(my_pass)
48+ ```
49+
4350## Quick Start
4451
4552``` python
53+ import urllib.parse
4654from sqlalchemy import create_engine
4755
48- engine = create_engine(" firebolt://email@domain:password@sample_database/sample_engine" )
56+ password = urllib.parse.quote_plus(" your_password_here" )
57+ engine = create_engine(" firebolt://email@domain:" + password + " @sample_database/sample_engine" )
4958connection = engine.connect()
5059
5160connection.execute(" CREATE FACT TABLE example(dummy int) PRIMARY INDEX dummy" )
@@ -58,10 +67,12 @@ for item in result.fetchall():
5867### [ AsyncIO] ( https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html ) extension
5968
6069``` python
70+ import urllib.parse
6171from sqlalchemy import text
6272from sqlalchemy.ext.asyncio import create_async_engine
6373
64- engine = create_async_engine(" asyncio+firebolt://email@domain:password@sample_database/sample_engine" )
74+ password = urllib.parse.quote_plus(" your_password_here" )
75+ engine = create_async_engine(" asyncio+firebolt://email@domain:" + password + " @sample_database/sample_engine" )
6576
6677async with engine.connect() as conn:
6778
You can’t perform that action at this time.
0 commit comments