Skip to content

Commit

Permalink
Make code example in Quick Start complete
Browse files Browse the repository at this point in the history
  • Loading branch information
haozhun authored and ggreg committed Jul 28, 2017
1 parent cca2e83 commit be504a9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ $ pip install presto-python-client
Use the DBAPI interface to query Presto:

```python
conn = prestodb.dbapi.Connection(
host=coordinator_hostname,
port=coordinator_port,
import prestodb
conn=prestodb.dbapi.Connection(
host='localhost',
port=8080,
user='the-user',
catalog='the-catalog',
schema='the-schema',
)
cur = conn.cursor()
cur.execute('select * from system.runtime.nodes')
cur.execute('SELECT * FROM system.runtime.nodes')
rows = cur.fetchall()
```

Expand Down

0 comments on commit be504a9

Please sign in to comment.