i need to execute an update query (Oracle), the query have some parameter from xcom, so i need to use a PythonOperator with a Oracle Hook (i'm not sure but i can't do this with an oracle operator).
I have already do the same with a select query like :
oracle_db = OracleHook(oracle_conn_id)
query = f"SELECT count(1) AS NB FROM mag;"
result = execute_get_first(oracle_db, query) <-- this working well
def execute_get_first(db, query):
result = None
try:
result = db.get_first(query) <-- db.execut() not exist
except Exception as e:
logging.error(e)
return result
my question is for an Oracle Hook, does it exist a method like get_first but for execute a query like update or insert ?