Close
    logoCloudomation Docs

    TaskSQLORACLE

    class tasks.task_sqloracle.TaskSQLORACLE

    Interact with a Oracle database. This task supports the execute command. The command expects an SQL query and returns a list of dictionaries containing the result.

    Consult the cx_Oracle documentation at https://cx-oracle.readthedocs.io/en/latest/index.html for more information.

    Inputs

    NameTypeDefaultDescription
    encodingstrUTF-8
    executestr
    hoststr
    paramsobjectNone
    passwordstr
    portint1521
    service_namestr
    userstr

    Outputs

    NameTypeDefaultDescription
    resultobject
    execution_idintThe ID of the task execution
    messagestrThe ended message for the task. If the task ended with an error, the message will contain information about what went wrong
    statusstrThe ended status for the task. Either "success" or "error".

    Constants

    input_list = ['encoding', 'execute', 'host', 'params', 'password', 'port', 'service_name', 'user']output_list = ['result']version = 1

    Methods

    run ()

    Example

    import flow_api
    def handler(system: flow_api.System, this: flow_api.Execution):
    oracle_server_version = this.task(
    'SQLORACLE',
    host='my-oracle-server',
    service_name='xe',
    user='username',
    password='password',
    execute='SELECT * FROM v$version',
    ).get('output_value')['result']
    this.log(oracle_server_version=oracle_server_version)
    Previous
    TaskSQLMSSQL
    Next
    TaskSQLPG