import os
import pandas as pd
from jaydebeapi import connect
def sql_query(query: str) -> pd.DataFrame:
jclassname = "classname"
url = "urlToCluster"
driver_args = {"keys":"values"}
path = "pathToJars"
jars = [f"{path}{item}" for item in os.listdir(path)]
with connect(jclassname=jclassname, url=url, driver_args=driver_args, jars=jars) as engine:
df = pd.read_sql_query(query, engine)
return df
When ever I connect to my sql jars, there is a ton of debug log outputs. I can't seem to figure out how to suppress these logs. I've tried using logging to turn off all logs but that doesn't seem to work. I'm at a loss as to what to do. I have a feeling it has something to do with jaydebeapi and java. The documentation of jaydebeapi is vague on it's features.