Supports JWT authentication
shawnzhu opened this issue · 0 comments
shawnzhu commented
This is a follow up of trinodb/trino-python-client#79 (released in 0.306.0) where it introduces JWT authentication in trino python client.
Use case
A data scientist could use pandas API to create dataframe from a SQL query in Trino requires JWT authentication
For instance:
from sqlalchemy import create_engine
import pandas as pd
engine = create_engine(
'trino://<host>:<port>',
connect_args={'jwt_token': 'a-jwt-token'},
)
sql_df = pd.read_sql(
"SELECT * FROM catalog-a.schema-b.table-c",
con=engine,
parse_dates=[
'created_at',
]
)
Notice that the above code example would work for user/password authentication protected Trino.