Skip to content

Commit

Permalink
Trying to fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Oct 10, 2024
1 parent 2ce747d commit 3e19a8a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
If you want to play with it Shillelagh has a `docker-compose.yml` file that will run
Postgres with the extension and the Python packages. Just run:
$ cd postgres/
$ docker compose up --build -d
$ docker compose -f postgres/docker-compose.yml up
Then you can run this script.
"""

from sqlalchemy import create_engine
from sqlalchemy import create_engine, text

# the backend uses psycopg2 under the hood, so any valid connection string for it will
# work; just replace the scheme with `shillelagh+multicorn2`
Expand All @@ -23,9 +22,9 @@
)
connection = engine.connect()

SQL = (
SQL = text(
'SELECT * FROM "https://docs.google.com/spreadsheets/d/'
'1LcWZMsdCl92g7nA-D6qGRqg1T5TiHyuKJUY1u9XAnsk/edit#gid=0"'
'1LcWZMsdCl92g7nA-D6qGRqg1T5TiHyuKJUY1u9XAnsk/edit#gid=0"',
)
for row in connection.execute(SQL):
print(row)

0 comments on commit 3e19a8a

Please sign in to comment.