Versions Compared

Key

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

Introduction

...

User Facing NameTypeDescriptionConstraints
LabelStringLabel for UI
Reference NameStringUniquely identified name for lineage
HostStringDB2 hostRequired (defaults to localhost on UI)
PortNumberSpecific port which DB2 is listening to

Optional

(default 50000)

DatabaseStringDatabase name to connectRequired
UsernameStringDB usernameRequired
PasswordPasswordUser passwordRequired
Transaction Isolation LevelSelectTransaction isolation level for queries run by this sink
Connection ArgumentsKeyvalue

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

DB2 connection properties


Table NameStringName of a database table to write to

...

User Facing NameTypeDescriptionConstraints
LabelStringLabel for UI
HostStringDB2 hostRequired (defaults to localhost on UI)
PortNumberSpecific port which DB2 is listening to

Optional

(default 50000)
DatabaseStringDatabase 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:

DB2 connection properties


Database CommandStringDatabase command to runValid SQL query


Data Types Mapping

DB2 Data TypeCDAP Schema Data TypeSupportComment
SMALLINTSchema.Type.INT+
INTEGERSchema.Type.INT+
BIGINTSchema.Type.LONG+
DECIMAL(p,s) or NUMERIC(p,s)Schema.LogicalType.DECIMAL+
DECFLOATSchema.Type.STRING+
REALSchema.Type.FLOAT+
DOUBLESchema.Type.DOUBLE+
CHARSchema.Type.STRING+
VARCHARSchema.Type.STRING+
CHAR(n) FOR BIT DATASchema.Type.BYTES+
VARCHAR(n) FOR BIT DATASchema.Type.BYTES+
BINARYSchema.Type.BYTES+
VARBINARYSchema.Type.BYTES+
GRAPHICSchema.Type.STRING+
VARGRAPHICSchema.Type.STRING+
CLOBSchema.Type.STRING+
BLOBSchema.Type.BYTES+
DBCLOBSchema.Type.STRING+
ROWID
-Not all flavors of DB2 support this type
XML
-Not all flavors of DB2 support this type
DATESchema.LogicalType.DATE+
TIMESchema.LogicalType.TIME_MICROS+
TIMESTAMPSchema.LogicalType.TIMESTAMP_MICROS+


Approach

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

...