Connection
Configuration
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
hostname | string | true | false | |
account | string | true | false | |
passwd | string | true | false | |
dbname | string | false | false | |
port | integer | true | false | |
ssl | boolean | false | false | |
ssh | boolean | false | false | |
ssh_user | string | false | false | |
ssh_host | string | false | false | |
ssh_port | integer | false | false | |
ssh_private_key | string | false | false | |
change_detection | boolean | false | false |
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
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
query | string | false | false | |
table | string | Table | false | false |
view | string | View | false | false |
Example
1 { 2 ... 3 "configuration": { 4 "query": "SELECT * from users", 5 "table": "users", 6 "view": "active_users" 7 } 8 }
Target
Configuration
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
preserve_table_on_resync | boolean | Preserve destination table when resyncing | false | false |
write_record_timestamps | boolean | Write row timestamp metadata | false | false |
created_column | string | ’Created at’ timestamp column | false | false |
updated_column | string | ’Updated at’ timestamp column | false | false |
Example
1 { 2 ... 3 "target": { 4 "configuration": { 5 "created_column": "", 6 "preserve_table_on_resync": false, 7 "updated_column": "", 8 "write_record_timestamps": false 9 } 10 } 11 }
Type handling
Destination types
POLYTOMIC TYPE | MYSQL TYPE |
---|---|
array<> | JSON |
bigint | BIGINT |
boolean | BOOLEAN |
date | DATE |
datetime | DATETIME |
decimal(precision, scale) | DECIMAL(precision,scale) |
double | DOUBLE |
int | INT |
json | JSON |
jsonarray | JSON |
number | DECIMAL(65,30) |
object{} | JSON |
single | FLOAT |
smallint | SMALLINT |
string | LONGTEXT |
time | TIME |
Source types
MYSQL TYPE | POLYTOMIC TYPE |
---|---|
BIGINT | bigint |
BIT | number |
BLOB | string |
CHAR | string |
DATE | date |
DATETIME | datetime |
DECIMAL(precision, scale) | decimal(precision, scale) |
DOUBLE | double |
ENUM | string |
FLOAT | single |
INT | int |
MEDIUMINT | int |
MEDIUMTEXT | string |
NUMERIC(precision, scale) | decimal(precision, scale) |
SMALLINT | smallint |
TEXT | string |
TIME | time |
TIMESTAMP | datetime |
TINYINT | smallint |
TINYTEXT | string |
UNSIGNED BIGINT | bigint |
UNSIGNED INT | int |
UNSIGNED SMALLINT | smallint |
UNSIGNED TINYINT | smallint |
VARCHAR | string |
YEAR | int |