Oracle Client
Use this connector to execute an SQL queries on an Oracle database from Swimlane Turbine.
Prerequisites
This connector can connect to an OracleDB using one of the following methods:
Using Connection String
- Use OracleDB Auth with Connection String asset to connect to the OracleDB using a Connection String.
- A connection string will be in the following format: <username>/<password>@<host>:<port>/<db_name>
Using DSN (Data Source Name)
- Use OracleDB Auth with DSN asset to connect to the OracleDB using DSN.
- This asset requires the following parameters:
- Username
- Password
- One of the following combinations of parameters:
- Host, Port, SID
- Host, Port, Service Name
- DSN string
- A DSN string will be in the following format:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=<port>))(CONNECT_DATA=(SID=<sid>)))
OR
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=<port>))(CONNECT_DATA=(SERVICE_NAME=<service_name>)))Capabilities
This connector provides the following capabilities:
- Run Read-Only Query on a Oracle Database
- Run Modification Query on a Oracle Database
Notes
See the following topics for more information:
Configurations
OracleDB Auth with Connection String
Connect to Oracle Databases using connection string.
Configuration Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
connection_string | Connection string to connect to the database. | string | Required |
OracleDB Auth with DSN
Connect to Oracle Databases using DSN.
Configuration Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
db_username | Username to connect to the Database. | string | Required |
db_password | Password. | string | Required |
dsn | DSN string. | string | Optional |
host | Server Host. | string | Optional |
sid | Database SID. | string | Optional |
service_name | Database service name. | string | Optional |
port | Host port to use. | number | Optional |
Actions
Run Modification Query
Run a query that modifies the database and does not return information. Example - INSERT.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
query | string | Required | Query - Using parameters is acceptable ('select * from foo where id = %s or id = %s'). Parameters need to be supplied through the parameter input in order. |
parameters | array | Optional | A list of parameters. Should be in order. |
Input Example
{"parameters":["idparam1","idparam2"],"query":"INSERT INTO example1 VALUES (2, 'Bob');"}
Output
Parameter | Type | Description |
|---|---|---|
result | string | Result of the operation |
query_executed | string | Output field: query_executed |
row_count | number | Count value |
Output Example
{"result":"Success","query_executed":"INSERT INTO example1 VALUES (2, 'Bob');","row_count":1}
Run Read-Only Query
Runs the supplied Query un-constrained and returns the result. Only for queries that return information. Example - SELECT.
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
query | string | Required | Query - Using parameters is acceptable ('select * from foo where id = %s or id = %s'). Parameters need to be supplied through the parameter input in order. |
parameters | array | Optional | A list of parameters. Should be in order. |
to_csv | boolean | Optional | When True, returns a CSV as an attachment. |
Input Example
{"parameters":["idparam1","idparam2"],"query":"SELECT TABLE_NAME FROM DBA_TABLE","to_csv":false}
Output
Parameter | Type | Description |
|---|---|---|
result | array | Result of the operation |
query_executed | string | Output field: query_executed |
row_count | number | Count value |
file | object | File |
file.file_name | string | Name of the resource |
file.file | string | Output field: file.file |
Output Example
{"result":[{"id":1,"name":"Adam"}],"query_executed":"SELECT * FROM table1","row_count":1}
Response Headers
Header | Description | Example |
|---|---|---|
Content-Type | The media type of the resource | application/json |
Date | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |