Skip to main content
Version: 8 - Apfelstrudel

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

  • host

    Type: string

  • port

    Type: anyOf

  • user

    Type: string

  • password

    Type: string

  • service_name

    Type: string

  • execute

    The query to execute.

    Type: string

  • params

    Use with named variables.

    Type: object

    Additional Properties: True

    Pattern Properties:

    • .*

      Data

  • encoding

    Type: string

    Default: utf-8

Output Schema

  • result

    Data

Constants

ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca']

Example

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
oracle_server_version = this.connect(
connector_type='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)