At the the end of any query in source A or B it is possible to add a body part.
The body part is meant to be an execution module to run any type of data transformation or data export / import functionality where the query part is a read only function.
To distinguish the body part from the query, the key word /*BODY*/ is needed to separate the content.
The query can consist of two parts and is separated by the tag /*BODY*/
- Sql query part
- Pl/Sql / Stored procedure part
For body content any sql script (plsql, stored procedures etc.) is allowed. If a script expects return values, they need to be redirected into data base variables or output files.
The order how the different sql parts are executed is fix. A body part is always optional.
Test Object Data execution order:
- Query Source A
- Body Source A
- Commit Source A
- Query Source B
- Body Source B
- Commit Source B
Ensure you do have elevated access rights for the db user defined within the OMrun environment to execute body parts in your test object.
Be especially careful with the body scripts.
Body scripts are very powerful and in case of using them the wrong way, they have the potential to destroy the data source you are addressing!