Versions Compared

Key

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

...

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

Optional

(default 3306)
DatabaseStringDatabase name to connectRequired
Username

String

DB usernameRequired
PasswordStringUser passwordRequired
Connection ArgumentsKeyvalueA list of arbitrary string tag/value pairs as connection arguments, list of properties https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html
Database CommandStringDatabase command to runValid SQL query
Use SSLSelectTurns on SSL encryption. The connection will fail if SSL is not available.
Keystore URLStringURL to the client certificate KeyStore (if not specified, use defaults). Must be accessible at the same location on host where CDAP Master is running and all hosts on which at least one HDFS, MapReduce, or YARN daemon role is running.

Keystore password

StringPassword for the client certificates KeyStore.
Truststore URLStringURL to the trusted root certificate KeyStore (if not specified, use defaults). Must be accessible at the same location on host where CDAP Master is running and all hosts on which at least one HDFS, MapReduce, or YARN daemon role is running.

Truststore password

StringPassword for the trusted root certificates KeyStore
Use compression protocolBooleanUse zlib compression when communicating with the server. Select this option for WAN connections.
SQL_MODEStringOverride the default SQL_MODE session variable used by the server.

Use ANSI quotes to quote identifiers

BooleanTreats " as an identifier quote character and not as a string quote character.


Data Types Mapping

MySQL Data TypeCDAP Schema Data TypeSupport
BITSchema.Type.BOOLEAN+
TINYINTSchema.Type.INT+
BOOL, BOOLEANSchema.Type.BOOLEAN+
SMALLINTSchema.Type.INT+
MEDIUMINTSchema.Type.INT+
INT,INTEGERSchema.Type.INT+
BIGINTSchema.Type.LONG+
FLOATSchema.Type.FLOAT+
DOUBLESchema.Type.DOUBLE+
DECIMALSchema.LogicalType.DECIMAL+
DATESchema.Type.DATE+
DATETIMESchema.LogicalType.TIMESTAMP_MICROS+
TIMESTAMPSchema.LogicalType.TIMESTAMP_MICROS+
TIMESchema.LogicalType.TIME_MICROS+
YEARSchema.Type.DATE+
CHARSchema.Type.STRING+
VARCHARSchema.Type.STRING+
BINARYSchema.Type.BYTES+
VARBINARYSchema.Type.BYTES+
TINYBLOBSchema.Type.BYTES+
TINYTEXTSchema.Type.STRING+
BLOBSchema.Type.BYTES+
TEXTSchema.Type.STRING+
MEDIUMBLOBSchema.Type.BYTES+
MEDIUMTEXTSchema.Type.STRING+
LONGBLOBSchema.Type.BYTES+
LONGTEXTSchema.Type.STRING+
ENUMSchema.Type.STRING+
SETSchema.Type.STRING+


Approach

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

...