Oracle Sink

Plugin version: 1.10.0

Writes records to an Oracle table. Each record will be written to a row in the table. For example, you periodically build a recommendation model for products on your online store. The model is stored in a FileSet and you want to export the contents of the FileSet to Oracle table where it can be served to your users.

Configuration

Property

Macro Enabled?

Version Introduced

Description

Property

Macro Enabled?

Version Introduced

Description

Use Connection

No

6.7.0/1.8.0

Optional. Whether to use a connection. If a connection is used, you do not need to provide the credentials.

Connection

Yes

6.7.0/1.8.0

Optional. Name of the connection to use. Project and service account information will be provided by the connection. You also can use the macro function ${conn(connection-name)}.

JDBC Driver Name

No

 

Required. Name of the JDBC driver to use.

Default is oracle.

Host

Yes

 

Required. Host that Oracle is running on.

Default is localhost.

Port

Yes

 

Required. Port that Oracle is running on.

Default is 1521.

Username

Yes

 

Optional. User identity for connecting to the specified database.

Password

Yes

 

Optional. Password to use to connect to the specified database.

Role

No

6.7.0/1.8.0

Optional. Login role of the user when connecting to the database.

Default is Normal.

Transaction Isolation Level

Yes

6.6.0/1.7.1

Optional. The transaction isolation level of the databse connection

  • TRANSACTION_READ_COMMITTED: No dirty reads. Non-repeatable reads and phantom reads are possible.

  • TRANSACTION_SERIALIZABLE (default): No dirty reads. Non-repeatable and phantom reads are prevented.

  • Note: If the user role selected is SYSDBA or SYSOPER, the plugin will default to TRANSACTION_READ_COMMITTED to prevent ORA-08178 errors

Connection Type

No

 

Required. Whether to use an SID, Service Name, or TNS Connect Descriptor when connecting to the database.

Connection Arguments

Yes

 

Optional. A list of arbitrary string key/value pairs as connection arguments. These arguments will be passed to the JDBC driver as connection arguments for JDBC drivers that may need additional configurations.

Reference Name

No

 

Required. Name used to uniquely identify this sink for lineage, annotating metadata, etc.

SID/Service Name/TNS Connect Descriptor

Yes

 

Required. 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

Yes

 

Required. Name of the table to export to.

Schema Name

Yes

6.6.0/1.7.1

Optional. Name of the database schema to write to. If left blank it will default to the database login user.

Default Batch Value

No

 

Optional. The default batch value that triggers an execution request.

Default is 10.

Example

Suppose you want to write output records to "users" table of Oracle database named (service name) "XE" that is running on "localhost", port 1251, as "system" user with "oracle" password. Ensure that the driver for Oracle is installed. You can also provide driver name for some specific driver, otherwise "oracle" will be used.

Property

Value

Property

Value

Reference Name

snk1

Driver Name

oracle

Host

localhost

Port

1251

Connection Type

Service Name

SID/Service Name/TNS Connect Descriptor

XE

Table Name

users

Schema Name

myschema

Username

system

Password

oracle

Data Type Mapping

Oracle Data Type

CDAP Schema Data Type

Comments

Oracle Data Type

CDAP Schema Data Type

Comments

VARCHAR2

string

 

NVARCHAR2

string

 

VARCHAR

string

 

NUMBER

decimal

For NUMBER types with a defined precision and scale.

NUMBER

string

For NUMBER types defined without a defined precision and scale.
Users can manually set output schema to map it to Decimal.

FLOAT

double

 

LONG

string

 

DATE

timestamp

 

BINARY_FLOAT

float

 

BINARY_DOUBLE

double

 

TIMESTAMP

timestamp

 

TIMESTAMP WITH TIME ZONE

string

Timestamp string in the following format: "2019-07-15 15:57:46.65 GMT"

TIMESTAMP WITH LOCAL TIME ZONE

timestamp

 

INTERVAL YEAR TO MONTH

string

Oracle's 'INTERVAL YEAR TO MONTH' literal in the standard format: "year[-month]"

INTERVAL DAY TO SECOND

string

Oracle's 'INTERVAL DAY TO SECOND' literal in the standard format:"[day] [hour][:minutes][:seconds[.milliseconds]"

RAW

bytes

 

LONG RAW

bytes

 

ROWID

string

 

UROWID

string

 

CHAR

string

 

NCHAR

string

 

CLOB

string

 

NCLOB

string

 

BLOB

bytes

 

BFILE

bytes

BFILE data type is not supported for the sink

 

Created in 2020 by Google Inc.