Set up of SQL Query in the Management Portal in the IRIS Data Platform
Hi,
Is there way to set up an automated batch job in the Management Portal to execute an SQL query. Also, how can the related view be exported. I have executed the SQL queries and see the view and created files manually. I could not find any related documentation on the batch processes, but I thought batch or automated jobs could be set up via the Management Portal. Any information is appreciated...
Thanks
Product version: IRIS 2021.1
Hi Alicia!
If you want to run some code on schedule (e.g. SQL query) I recommend looking at Task Manager.
Also, there is a handy utility to set up a regular task in IRIS using cron expression programmatically with one line.
hi...thank you for this comment....I remember the Task manager in Ensemble, but since we upgraded to IRIS, the System Operation selection is grayed out. I submitted a case to the Vendor to see if I can get access.
Thanks again!
You'll need the resource %Admin_Task to use task manager functions.
Once you have access to it, set up a class that extends %SYS.Task.Definition and override the OnTask() method. Then you can set it up in the task scheduler and it'll run the OnTask() method according to whatever schedule you set.
Hi,
Thanks so much for the help. I am able to access the Task Manager. Question, can an SQL query be set up via the Task manager wizard so that it will execute?
Thanks
Absolutely! You will need to write a method that contains the SQL and then execute the method from a Task. As the linked docs suggest, write your own task by creating a class that extends %SYS.Task.Definition: https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?...