MySQL

Supports:

  • ✅ Models
  • ✅ Model sync destination
  • ✅ Bulk sync source
  • ✅ Bulk sync destination

Connection

Configuration

NameTypeDescriptionRequired
hostnamestringHostnametrue
accountstringUsernametrue
passwdstringPasswordtrue
dbnamestringDatabase (optional)false
portintegerPorttrue
sslbooleanUse SSLfalse
sshbooleanConnect over SSH tunnelfalse
ssh_userstringSSH userfalse
ssh_hoststringSSH hostfalse
ssh_portintegerSSH portfalse
ssh_private_keystringPrivate keyfalse
change_detectionbooleanUse replication for bulk syncsfalse

Example

1{
2 "name": "MySQL connection",
3 "type": "mysql",
4 "configuration": {
5 "account": "admin",
6 "change_detection": false,
7 "dbname": "mydb",
8 "hostname": "database.example.com",
9 "passwd": "password",
10 "port": 3306,
11 "ssh": false,
12 "ssh_host": "bastion.example.com",
13 "ssh_port": 22,
14 "ssh_private_key": "",
15 "ssh_user": "",
16 "ssl": false
17 }
18}

Model Sync

Source

Configuration

NameTypeDescriptionRequired
querystringfalse
tablestringTablefalse
viewstringViewfalse

Example

1{
2 ...
3 "configuration": {
4 "query": "SELECT * from users",
5 "table": "users",
6 "view": "active_users"
7 }
8}

Target

MySQL connections may be used as the destination in a model sync.

All targets

Configuration
NameTypeDescriptionRequired
preserve_table_on_resyncbooleanPreserve destination table when resyncingfalse
write_record_timestampsbooleanWrite row timestamp metadatafalse
created_columnstring’Created at’ timestamp columnfalse
updated_columnstring’Updated at’ timestamp columnfalse
write_null_valuesbooleanCopy null values

When enabled updates will set fields to NULL when the source value is null
false
Example
1{
2 ...
3 "target": {
4 "configuration": {
5 "created_column": "",
6 "preserve_table_on_resync": false,
7 "updated_column": "",
8 "write_null_values": false,
9 "write_record_timestamps": false
10 }
11 }
12}

Type handling

Destination types

POLYTOMIC TYPEMYSQL TYPE
array<>JSON
bigintBIGINT
booleanBOOLEAN
dateDATE
datetimeDATETIME
decimal(precision, scale)DECIMAL(precision,scale)
doubleDOUBLE
intINT
jsonJSON
jsonarrayJSON
numberDECIMAL(65,30)
object{}JSON
singleFLOAT
smallintSMALLINT
stringLONGTEXT
timeTIME

Source types

MYSQL TYPEPOLYTOMIC TYPE
BIGINTbigint
BITnumber
BLOBstring
BLOBbinary
CHARstring
DATEdate
DATETIMEdatetime
DECIMAL(precision, scale)decimal(precision, scale)
DOUBLEdouble
ENUMstring
FLOATsingle
INTint
MEDIUMBLOBbinary
MEDIUMINTint
MEDIUMTEXTstring
NUMERIC(precision, scale)decimal(precision, scale)
SMALLINTsmallint
TEXTstring
TIMEtime
TIMESTAMPdatetime
TINYBLOBbinary
TINYINTsmallint
TINYTEXTstring
UNSIGNED BIGINTbigint
UNSIGNED INTint
UNSIGNED SMALLINTsmallint
UNSIGNED TINYINTsmallint
VARBINARYbinary
VARCHARstring
YEARint