I've discovered Oracle's SQLCL and have been able to make it work in the terminal. I've also been able to make it work in Python, up through entering the actual SQL query.
My code in Python looks like this:
import subprocess
import time
import os
os.chdir("C:/sqlcl/bin")
subprocess.run(["sql", "username/password@//database-oracle.datamore.com/moreprod.more:1521"])
At this point, I get the "SQL>" prompt showing that Oracle is ready to take my query. What I'd like to do is enter the location to a script and have it be executed, something like:
@C:/Users/username/queries/test-query.sql;
Basically, I need a way to pass a SQL statement or a script location via Python to the SQL prompt.