Closed
Description
What happened?
import ibis
from trino.auth import BasicAuthentication
from getpass import getpass
USER = input("User: ")
PASSWORD = getpass("Password: ")
conn = ibis.trino.connect(
host="host",
port=443,
user=USER,
auth=BasicAuthentication(USER, PASSWORD),
http_scheme="https",
catalog="hive"
)
TypeError: trino.dbapi.connect() got multiple values for keyword argument 'catalog'
When I remove the catalog
parameter:
import ibis
from trino.auth import BasicAuthentication
from getpass import getpass
USER = input("User: ")
PASSWORD = getpass("Password: ")
conn = ibis.trino.connect(
host="host",
port=443,
user=USER,
auth=BasicAuthentication(USER, PASSWORD),
http_scheme="https"
)
table = conn.table('catalog.schema.table-name')
query = (
table
.filter(table['column_name'] > 100) # Filter rows based on a condition
.select(['column_name', 'another_column']) # Select specific columns
)
# Execute the query
result_df = query.execute() # This will return a Pandas DataFrame
TrinoUserError: TrinoUserError(type=USER_ERROR, name=MISSING_CATALOG_NAME, message="line 5:6: Catalog must be specified when session catalog is not set", query_id=..._dirgf)
This works perfect using the pure trino
API:
conn = trino.dbapi.connect(
host="host",
port=443,
user=USER,
catalog="hive",
auth=BasicAuthentication(USER, PASSWORD),
http_scheme="https",
)
What version of ibis are you using?
10.5.0
What backend(s) are you using, if any?
Trino
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Type
Projects
Status
done