-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
In the section https://cloud.ibm.com/docs/watsonxdata?topic=watsonxdata-con-presto-serv#conn-to-prestpython, the example code is in wrong format. Correct one is
import os
import prestodb
username=os.environ["ENG_USERNAME"]
password=os.environ["ENG_PASSWORD"]
hostname=os.environ["ENG_HOST"]
portnumber=os.environ["ENG_PORT"]
with prestodb.dbapi.connect(
host=hostname,
port=portnumber,
user=username,
catalog='tpch',
schema='tiny',
http_scheme='https',
auth=prestodb.auth.BasicAuthentication(username,password)
) as conn:
cur = conn.cursor()
cur.execute('select * from tpch.tiny.customer limit 10')
rows = cur.fetchall()
print(rows)Metadata
Metadata
Assignees
Labels
No labels