Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Oracle datatypes mappings and conversions:


Oracle has two types of driver thin and oci.

The JDBC Thin client is a pure Java, Type IV driver. It is lightweight and easy to install. More https://docs.oracle.com/cd/E11882_01/java.112/e16548/jdbcthin.htm#JJDBC28195

Oci driver requires native libraries to be installed, but provides some additional features like OCI Connection Pooling, Client Result Cache etc.

More https://www.oracle.com/database/technologies/appdev/oci.html,

https://docs.oracle.com/cd/E11882_01/java.112/e16548/instclnt.htm#JJDBC28218


Also oracle support tnsnames.ora file on client machine. More https://docs.oracle.com/database/121/NETRF/tnsnames.htm#NETRF007

Design

The suggestion is to create maven submodule oracle-plugin under database-plugins repo.

...

User Facing NameTypeDescriptionConstraints
LabelStringLabel for UI
Reference NameStringUniquely identified name for lineage
HostStringOracle hostRequired (defaults to localhost on UI)
PortNumberSpecific port where Oracle running on

Optional

(default 1521)

Database

SIDStringSID name to connectRequired
Service nameStringDatabase Service name to connectRequired
UsernameStringDB usernameRequired
PasswordPasswordUser passwordRequired
Connection ArgumentsKeyvalue

A list of arbitrary string tag/value pairs as connection arguments, list of properties

https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html


Table NameStringName of a database table to write to
Driver typeSelectOracle driver typePossible values (thin, oci)

...

User Facing NameTypeDescriptionConstraints
LabelStringLabel for UI
Reference NameStringUniquely identified name for lineage
HostStringOracle hostRequired (defaults to localhost on UI)
PortNumberSpecific port where Oracle running on

Optional

(default 1521)Database
SIDStringSID name to connectRequired
Service nameStringDatabase Service name to connectRequired
Import QueryStringQuery for import dataValid SQL query
UsernameStringDB usernameRequired
PasswordStringUser passwordRequired
Bounding QueryStringReturns max and minof split-By FiledValid SQL query
Split-By Field NameStringField name which will be used to generate splits
Number of Splits to GenerateNumberNumber of splits to generate
Connection ArgumentsKeyvalueA list of arbitrary string tag/value pairs as connection arguments, list of propertiesĀ https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html
Driver typeSelectOracle driver typePossible values (thin, oci)


Action Properties


User Facing NameTypeDescriptionConstraints
LabelStringLabel for UI
HostStringOracle hostRequired (defaults to localhost on UI)
PortNumberSpecific port where Oracle running on

Optional

(default 1521)
Database
SIDStringSID name to connectRequired
Service nameString
Database
Service name to connectRequired
Username

String

DB usernameRequired
PasswordStringUser passwordRequired
Connection ArgumentsKeyvalue

A list of arbitrary string tag/value pairs as connection arguments, list of propertiesĀ 

https://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html


Database CommandStringDatabase command to runValid SQL query
Driver typeSelectOracle driver typePossible values (thin, oci)


Data Types Mapping

Oracle Data TypeCDAP Schema Data TypeSupportComment
VARCHAR2Schema.Type.STRING+
NVARCHAR2Schema.Type.STRING+
VARCHARSchema.Type.STRING+
NUMBERSchema.LogicalType.DECIMAL+
FLOATSchema.Type.DOUBLE+FLOAT(126) by default value is represented internally as NUMBER
LONGSchema.Type.STRING+Character data of variable length.
DATESchema.LogicalType.TIMESTAMP_MICROS+
BINARY_FLOATSchema.Type.FLOAT+
BINARY_DOUBLESchema.Type.DOUBLE+
TIMESTAMPSchema.LogicalType.TIMESTAMP_MICROS+
TIMESTAMP WITH TIME ZONESchema.LogicalType.TIMESTAMP_MICROS*Currently converted to UTC time, modifying original time zone.
TIMESTAMP WITH LOCAL TIME ZONESchema.LogicalType.TIMESTAMP_MICROS+
INTERVAL YEAR TO MONTHSchema.Type.STRING+
INTERVAL DAY TO SECONDSchema.Type.STRING+
RAWSchema.Type.BYTES+
LONG RAWSchema.Type.BYTES+
ROWIDSchema.Type.STRING+
UROWIDSchema.Type.STRING+
CHARSchema.Type.STRING+
NCHARSchema.Type.STRING+
CLOBSchema.Type.STRING+
NCLOBSchema.Type.STRING+
BLOBSchema.Type.BYTES+
BFILESchema.Type.BYTES*Deprecated by Oracle in java api, added mapping to Type.BYTES



Approach

Create a module oracle-plugin inĀ database-plugins project, reuse existing database-plugins code if possible. Add Oracle-specific properties to configuration, add support for Oracle-specific datatypes. Update UI widgets JSON definitions.

...