Search code examples
pythonoracleoracle-autonomous-db

How do I schedule the execution of SQL + Python + OML4PY code in the Oracle Autonomous Database?


I would like to use SQL + Python + OML4PY code to do ETL on Oracle Autonomous Database (ADB) tables. In particular I would like this ETL code of script to execute daily. What is the best way to schedule that execution? Should I enter the SQL+Python+OML code into an Oracle Machine Learning (OML) notebook and schedule that notebook to execute daily? Or should I use some other mechanism to schedule the execution of that code on ADB?

I have written my code in and OML notebook, but I don't know how to schedule its execution, or even if that is best practice.


Solution

  • OML Notebooks supports job scheduling. In the OML UI home page click the Jobs icon, or from the menu, select "Jobs". From there, you create your job. You can enter the start date, repeat frequency, and several other settings. Here's the Create Job Dialog. This documentation should get you started

    You can also use DBMS_SCHEDULER directly.