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.
Inputs
Name | Type | Default | Description |
---|---|---|---|
encoding | str | UTF-8 | |
execute | str | ||
host | str | ||
params | object | None | |
password | str | ||
port | int | 1521 | |
service_name | str | ||
user | str |
Outputs
Name | Type | Default | Description |
---|---|---|---|
execution_id | int | The ID of the connection execution | |
message | str | The ended message for the connection. If the connection ended with an error, the message will contain information about what went wrong | |
result | object | ||
status | str | The ended status for the connection. Either "success" or "error". |
Constants
input_list = ['encoding', 'execute', 'host', 'params', 'password', 'port', 'service_name', 'user'] output_list = ['result'] ssl_context_inputs = ['check_hostname', 'client_cert', 'client_key', 'server_ca'] version = 1Methods
execute ()
log (message)
one_of_inputs (options)
run ()
Example
import flow_api
def handler(system: flow_api.System, this: flow_api.Execution):
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)