OracleExecutor Operator

This page introduces the OracleExecutor operator, a workflow operator that allows executing custom queries on an Oracle instance.

Prerequisites

This section provides the minimum requirements that you should meet in order to use the Oracle Executor operator.

Supported versions

  • Oracle 12c or later

Network requirements

  • The OracleExecutor operator must be able to connect to the Oracle URL or IP address and port (default port is 1521)

Permissions

  • The user used to log into the database must have enough privilege to perform the required queries

Operator arguments

When you define a task that uses the Oracle Executor operator you should specify some configuration information to allow the operator to connect to the Oracle instance and execute queries.

The operator inherits the connection arguments from the properties of the component when referenced in the task definition. The Akamas user can also override the properties of the component or not reference it at all defining the connection fields directly in the configuration of the task.

The following table provides the list of all properties required to define a task that uses the OracleExecutor operator.

Notice: it is a good practice to define only queries that update the state of the database. Is not possible to use SELECT queries to extract data from the database.

Examples

Truncate tables after a load test

In the following example, the operator performs a cleanup action on a table of the database:

tasks:
- name: clean database
  operator: OracleExecutor
  arguments:
    sql:
    - TRUNCATE TABLE user_action
    - DELETE FROM user WHERE id LIKE 'test%'
    connection:
      user: application
      password: password
      dsn: oradb.dev.akamas.io/XE

Update database entries

In the following example, the operator leverages its templating features to update a table:

tasks:
- name: set value
  operator: OracleExecutor
  arguments:
    sql:
    - UPDATE rs_component_pros SET value='${app.max_connections}' WHERE property='maxconn'
    component: oracledb

The referenced oracledb component contains properties that specify how to connect to the Oracle database instance:

name: oracledb
componentType: Oracle Database 18c
properties:
  connection:
    user: application
    password: password
    host: oradb.dev.akamas.io
    service: XE

Last updated