Hello! I'm using the client to query Starburst.
I've been trying to understand how the Cache works for OAuth2Authentication since it's prompting for authentication at every cursor created.
I imagine it'd make sense to prompt for it at each connection created but not at every cursor, if not closing the previous opened connection.
I've got that error with the following code:
import trino
conn = trino.dbapi.connect(
host=<HOST>,
port=443,
user=<USER>,
http_scheme='https',
auth=trino.auth.OAuth2Authentication()
)
cur = conn.cursor()
cur.execute('SHOW CATALOGS')
cur = conn.cursor()
cur.execute('SHOW SCHEMAS IN hive')

If I reuse the same cursor this behavior doesn't happen and I don't need to authenticate multiple times.
Hello! I'm using the client to query Starburst.
I've been trying to understand how the Cache works for OAuth2Authentication since it's prompting for authentication at every cursor created.
I imagine it'd make sense to prompt for it at each connection created but not at every cursor, if not closing the previous opened connection.
I've got that error with the following code:
If I reuse the same cursor this behavior doesn't happen and I don't need to authenticate multiple times.