Skip to main content
Version: 11 - TBD

ConnectorTypeSQLORACLE

class connector_types.connector_type_sqloracle.ConnectorTypeSQLORACLE

Interact with a Oracle database. This connector type 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.

Input Schema

  • schema_version

    Type: string

  • authentication

    Type: anyOf

  • host

    The remote hostname or IP address.

    Type: string

  • port

    Type: anyOf

  • service_name

    Type: string

  • mode

    Type: anyOf

  • autocommit

    If set to False transactions are enabled. Certain operations (e.g. CREATE DATABASE) require autocommit=True.

    Type: boolean

  • encoding

    The encoding to use when binary data is returned by the server.

    Type: string

    Default: utf-8

Output Schema

  • result

    Data

Example

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
oracle_server_version = this.connect(
connector_type='SQLORACLE',
authentication={
'authentication_method': 'username_password',
'username': '...',
'password': '...',
},
host='...',
service_name='...',
mode={
'mode_name': 'execute',
'query': 'SELECT * FROM v$version',
},
).get('output_value')['result']
this.log(oracle_server_version=oracle_server_version)
return this.success('all done')