Introduction
...
The suggestion is to create maven submodule db2-plugin under database-plugins repo.
Sink Properties
User Facing Name | Type | Description | Constraints |
---|---|---|---|
Label | String | Label for UI | |
Reference Name | String | Uniquely identified name for lineage | |
Host | String | DB2 host | Required (defaults to localhost on UI) |
Port | Number | Specific port which DB2 is listening to | Optional (default |
50000) | |||
Database | String | Database name to connect | Required |
Username | String | DB username | Required |
Password | Password | User password | Required |
Transaction Isolation Level | Select | Transaction isolation level for queries run by this sink | |
Connection Arguments | Keyvalue | A list of arbitrary string tag/value pairs as connection arguments, list of properties: |
https://www.ibm.com/support/knowledgecenter/bg/SSEPGG_9.7.0
/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_r0052075.html
Table Name | String | Name of a database table to write to |
Source Properties
User Facing Name | Type | Description | Constraints |
---|---|---|---|
Label | String | Label for UI | |
Reference Name | String | Uniquely identified name for lineage | |
Host | String | DB2 host | Required (defaults to localhost on UI) |
Port | Number | Specific port which DB2 is listening to | Optional (default |
50000) | |||
Database | String | Database name to connect | Required |
Import Query | String | Query for import data | Valid SQL query |
Username | String | DB username | Required |
Password | String | User password | Required |
Bounding Query | String | Returns max and minof split-By Filed | Valid SQL query |
Split-By Field Name | String | Field name which will be used to generate splits | |
Number of Splits to Generate | Number | Number of splits to generate | |
Transaction Isolation Level | Select | Transaction isolation level for queries run by this sink | |
Connection Arguments | Keyvalue | A list of arbitrary string tag/value pairs as connection arguments, list of properties: |
https://www.ibm.com/support/knowledgecenter/bg/SSEPGG_9.7.0
/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_r0052075.html
Action Properties
User Facing Name | Type | Description | Constraints |
---|---|---|---|
Label | String | Label for UI | |
Host | String | DB2 host | Required (defaults to localhost on UI) |
Port | Number | Specific port which DB2 is listening to | Optional (default |
50000) | |||
Database | String | Database name to connect | Required |
Username | String | DB username | Required |
Password | String | User password | Required |
Connection Arguments | Keyvalue | A list of arbitrary string tag/value pairs as connection arguments, list of properties: |
https://www.ibm.com/support/knowledgecenter/bg/SSEPGG_9.7.0
/com.ibm.db2.luw.apdv.java.doc/src/tpc/imjcc_r0052075.html
Database Command | String | Database command to run | Valid SQL query |
Data Types Mapping
DB2 Data Type | CDAP Schema Data Type | Support | Comment |
---|---|---|---|
SMALLINT | Schema.Type.INT | + | |
INTEGER | Schema.Type.INT | + | |
BIGINT | Schema.Type.LONG | + | |
DECIMAL(p,s) or NUMERIC(p,s) | Schema.LogicalType.DECIMAL | + | |
DECFLOAT | Schema.Type.STRING | + | |
REAL | Schema.Type.FLOAT | + | |
DOUBLE | Schema.Type.DOUBLE | + | |
CHAR | Schema.Type.STRING | + | |
VARCHAR | Schema.Type.STRING | + | |
CHAR(n) FOR BIT DATA | Schema.Type.BYTES | + | |
VARCHAR(n) FOR BIT DATA | Schema.Type.BYTES | + | |
BINARY | Schema.Type.BYTES | + | |
VARBINARY | Schema.Type.BYTES | + | |
GRAPHIC | Schema.Type.STRING | + | |
VARGRAPHIC | Schema.Type.STRING | + | |
CLOB | Schema.Type.STRING | + | |
BLOB | Schema.Type.BYTES | + | |
DBCLOB | Schema.Type.STRING | + | |
ROWID | - | Not all flavors of DB2 support this type | |
XML | - | Not all flavors of DB2 support this type | |
DATE | Schema.LogicalType.DATE | + | |
TIME | Schema.LogicalType.TIME_MICROS | + | |
TIMESTAMP | Schema.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.
...