Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions oracle-plugin/docs/Oracle-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ Properties

**Port:** Port that Oracle is running on.

**SID/Service Name:** Oracle connection point (Database name or Service name).
**Connection Type** Whether to use an SID, Service Name, or TNS Connect Descriptor when connecting to the database.

**Connection Type** Whether to use an SID or Service Name when connecting to the database.
**SID/Service Name/TNS Connect Descriptor:** Oracle connection point (Database name, Service name, or a TNS Connect Descriptor). When using TNS, place
the full TNS Connect Descriptor in the text field. For example:
(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 123.123.123.123)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)
(SERVICE_NAME = XE)))

**Username:** User identity for connecting to the specified database.

Expand Down
7 changes: 5 additions & 2 deletions oracle-plugin/docs/Oracle-batchsink.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ You also can use the macro function ${conn(connection-name)}.

**Port:** Port that Oracle is running on.

**SID/Service Name:** Oracle connection point (Database name or Service name).

**Role** Login role of the user when connecting to the database. For eg, NORMAL, SYSDBA, SYSOPER, etc.

**Connection Type** Whether to use an SID or Service Name when connecting to the database.

**SID/Service Name/TNS Connect Descriptor:** Oracle connection point (Database name, Service name, or a TNS Connect Descriptor). When using TNS, place
the full TNS Connect Descriptor in the text field. For example:
(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 123.123.123.123)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)
(SERVICE_NAME = XE)))

**Table Name:** Name of the table to export to.

**Username:** User identity for connecting to the specified database.
Expand Down
9 changes: 6 additions & 3 deletions oracle-plugin/docs/Oracle-batchsource.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ You also can use the macro function ${conn(connection-name)}.

**Port:** Port that Oracle is running on.

**SID/Service Name:** Oracle connection point (Database name or Service name).
**Connection Type** Whether to use an SID, Service Name, or TNS Connect Descriptor when connecting to the database.

**Role** Login role of the user when connecting to the database.
**SID/Service Name/TNS Connect Descriptor:** Oracle connection point (Database name, Service name, or a TNS Connect Descriptor). When using TNS, place
the full TNS Connect Descriptor in the text field. For example:
(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 123.123.123.123)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)
(SERVICE_NAME = XE)))

**Connection Type** Whether to use an SID or Service Name when connecting to the database.
**Role** Login role of the user when connecting to the database.

**Import Query:** The SELECT query to use to import data from the specified table.
You can specify an arbitrary number of columns to import, or import all columns using \*. The Query should
Expand Down
7 changes: 5 additions & 2 deletions oracle-plugin/docs/Oracle-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ authentication. Optional for databases that do not require authentication.

**Password:** Password to use to connect to the specified database.

**Connection Type:** Whether to use an SID or Service Name when connecting to the database.
**Connection Type** Whether to use an SID, Service Name, or TNS Connect Descriptor when connecting to the database.

**SID/Service Name:** Oracle connection point (Database name or Service name).
**SID/Service Name/TNS Connect Descriptor:** Oracle connection point (Database name, Service name, or a TNS Connect Descriptor). When using TNS, place
the full TNS Connect Descriptor in the text field. For example:
(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 123.123.123.123)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)
(SERVICE_NAME = XE)))

**Role:** Login role of the user when connecting to the database.

Expand Down
7 changes: 5 additions & 2 deletions oracle-plugin/docs/Oracle-postaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ If set to 'failure', the action will only be executed if the pipeline run failed

**Port:** Port that Oracle is running on.

**SID/Service Name:** Oracle connection point (Database name or Service name).
**Connection Type** Whether to use an SID, Service Name, or TNS Connect Descriptor when connecting to the database.

**Connection Type** Whether to use an SID or Service Name when connecting to the database.
**SID/Service Name/TNS Connect Descriptor:** Oracle connection point (Database name, Service name, or a TNS Connect Descriptor). When using TNS, place
the full TNS Connect Descriptor in the text field. For example:
(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 123.123.123.123)(PORT = 1521))(CONNECT_DATA =(SERVER = DEDICATED)
(SERVICE_NAME = XE)))

**Username:** User identity for connecting to the specified database.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ public static class OracleActionConfig extends DBSpecificQueryConfig {

@Override
public String getConnectionString() {
if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(this.connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT,
host, port, database);
if (OracleConstants.TNS_CONNECTION_TYPE.equals(this.connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_TNS_FORMAT, database);
} else if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(this.connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT, host, port, database);
} else {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT, host, port, database);
}
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT, host, port, database);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,15 @@ protected String getConnectionString(@Nullable String database) {
if (database == null) {
return config.getConnectionString();
}
if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(config)) {
if (OracleConstants.TNS_CONNECTION_TYPE.equals(config.getConnectionType())) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_TNS_FORMAT, database);
} else if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(config.getConnectionType())) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT, config.getHost(),
config.getPort(), database);
config.getPort(), database);
} else {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT,
config.getHost(), config.getPort(), database);
}
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT,
config.getHost(), config.getPort(), database);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ public OracleConnectorConfig(String host, int port, String user, String password

@Override
public String getConnectionString() {
if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(connectionType)) {
if (OracleConstants.TNS_CONNECTION_TYPE.equals(getConnectionType())) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_TNS_FORMAT, database);
} else if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(getConnectionType())) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT, host, getPort(), database);
} else {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT, host, getPort(), database);
}
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT, host, getPort(), database);
}

@Name(OracleConstants.CONNECTION_TYPE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ private OracleConstants() {
public static final String PLUGIN_NAME = "Oracle";
public static final String ORACLE_CONNECTION_STRING_SID_FORMAT = "jdbc:oracle:thin:@%s:%s:%s";
public static final String ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT = "jdbc:oracle:thin:@//%s:%s/%s";
public static final String ORACLE_CONNECTION_STRING_TNS_FORMAT = "jdbc:oracle:thin:@%s";
public static final String DEFAULT_BATCH_VALUE = "defaultBatchValue";
public static final String DEFAULT_ROW_PREFETCH = "defaultRowPrefetch";
public static final String SERVICE_CONNECTION_TYPE = "service";
public static final String CONNECTION_TYPE = "connectionType";
public static final String ROLE = "role";
public static final String NAME_DATABASE = "database";
public static final String TNS_CONNECTION_TYPE = "TNS";
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ public static class OracleQueryActionConfig extends DBSpecificQueryActionConfig

@Override
public String getConnectionString() {
if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(this.connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT,
host, port, database);
if (OracleConstants.TNS_CONNECTION_TYPE.equals(this.connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_TNS_FORMAT, database);
} else if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(this.connectionType)) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT, host, port, database);
} else {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT, host, port, database);
}
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT, host, port, database);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,15 @@ public static class OracleSourceConfig extends AbstractDBSpecificSourceConfig {

@Override
public String getConnectionString() {
if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(connection.getConnectionType())) {
if (OracleConstants.TNS_CONNECTION_TYPE.equals(connection.getConnectionType())) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_TNS_FORMAT, connection.getDatabase());
} else if (OracleConstants.SERVICE_CONNECTION_TYPE.equals(connection.getConnectionType())) {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SERVICE_NAME_FORMAT, connection.getHost(),
connection.getPort(), connection.getDatabase());
connection.getPort(), connection.getDatabase());
} else {
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT,
connection.getHost(), connection.getPort(), connection.getDatabase());
}
return String.format(OracleConstants.ORACLE_CONNECTION_STRING_SID_FORMAT,
connection.getHost(), connection.getPort(), connection.getDatabase());
}

@Override
Expand Down
7 changes: 6 additions & 1 deletion oracle-plugin/widgets/Oracle-action.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,18 @@
{
"id": "service",
"label": "Service Name"
},
{
"id": "TNS",
"label": "TNS Connect Descriptor"
}
]
}
},
{
"widget-type": "textbox",
"label": "SID/Service Name",
"label": "SID/Service Name/TNS Connect Descriptor",
"description": "Oracle connection point (Database name, Service name, or TNS Connect Descriptor)",
"name": "database"
},
{
Expand Down
8 changes: 6 additions & 2 deletions oracle-plugin/widgets/Oracle-batchsink.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
{
"id": "service",
"label": "Service Name"
},
{
"id": "TNS",
"label": "TNS Connect Descriptor"
}
]
}
Expand Down Expand Up @@ -134,8 +138,8 @@
},
{
"widget-type": "textbox",
"label": "SID/Service Name",
"description": "Oracle connection point (Database name or Service name)",
"label": "SID/Service Name/TNS Connect Descriptor",
"description": "Oracle connection point (Database name, Service name, or TNS Connect Descriptor)",
"name": "database"
},
{
Expand Down
8 changes: 6 additions & 2 deletions oracle-plugin/widgets/Oracle-batchsource.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,18 @@
{
"id": "service",
"label": "Service Name"
},
{
"id": "TNS",
"label": "TNS Connect Descriptor"
}
]
}
},
{
"widget-type": "textbox",
"label": "SID/Service Name",
"description": "Oracle connection point (Database name or Service name)",
"label": "SID/Service Name/TNS Connect Descriptor",
"description": "Oracle connection point (Database name, Service name, or TNS Connect Descriptor)",
"name": "database"
},
{
Expand Down
7 changes: 6 additions & 1 deletion oracle-plugin/widgets/Oracle-connector.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,18 @@
{
"id": "service",
"label": "Service Name"
},
{
"id": "TNS",
"label": "TNS Connect Descriptor"
}
]
}
},
{
"widget-type": "textbox",
"label": "SID/Service Name",
"label": "SID/Service Name/TNS Connect Descriptor",
"description": "Oracle connection point (Database name, Service name, or TNS Connect Descriptor)",
"name": "database"
}
]
Expand Down
7 changes: 6 additions & 1 deletion oracle-plugin/widgets/Oracle-postaction.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,18 @@
{
"id": "service",
"label": "Service Name"
},
{
"id": "TNS",
"label": "TNS Connect Descriptor"
}
]
}
},
{
"widget-type": "textbox",
"label": "SID/Service Name",
"label": "SID/Service Name/TNS Connect Descriptor",
"description": "Oracle connection point (Database name, Service name, or TNS Connect Descriptor)",
"name": "database"
},
{
Expand Down