Hello i am trying to load a huge query (5000+ lines) from a text file and execute the whole query at the once using the code below. How can i load my query from a txt file and execute it using python pandas
i opened up my text file using the code below
query1 = open("Script.txt","r")
and tried executing the script with the code below.
df_ora1 = pd.read_sql(query1, con=connection1)
I am getting the following error
DatabaseError: Execution failed on sql '<_io.TextIOWrapper expecting string or bytes object
my text file has """ start query
end query """
query1 = open("Script.txt","r").read().sqlfiles