Google Cloud MySQL
Supports:
- ✅ Models
- ✅ Model sync destination
- ✅ Bulk sync source
- ✅ Bulk sync destination
Connection
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
change_detection | boolean | Use replication for bulk syncs | false |
connection_name | string | Cloud SQL connection name Takes the form of project:region:instance | true |
credentials | string | Service account key | true |
database | string | Database | true |
password | string | Password May be omitted when authenticating to Postgres using the service account key. | false |
username | string | Username | false |
Example
1 { 2 "name": "Google Cloud MySQL connection", 3 "type": "googlecloudmysql", 4 "configuration": { 5 "change_detection": false, 6 "connection_name": "project:region:instance", 7 "credentials": "", 8 "database": "sampledb", 9 "password": "secret", 10 "username": "cloudsql" 11 } 12 }
Model Sync
Source
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
query | string | false | |
table | string | Table | false |
view | string | View | false |
Example
1 { 2 ... 3 "configuration": { 4 "query": "SELECT * from users", 5 "table": "users", 6 "view": "active_users" 7 } 8 }
Target
Google Cloud MySQL connections may be used as the destination in a model sync.
All targets
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
created_column | string | ’Created at’ timestamp column | false |
preserve_table_on_resync | boolean | Preserve destination table when resyncing | false |
updated_column | string | ’Updated at’ timestamp column | false |
write_null_values | boolean | Copy null values When enabled updates will set fields to NULL when the source value is null | false |
write_record_timestamps | boolean | Write row timestamp metadata | 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 TYPE | GOOGLE CLOUD 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
| GOOGLE CLOUD MYSQL TYPE | POLYTOMIC TYPE |
|---|---|
BIGINT | bigint |
BIT | number |
BLOB | binary |
BLOB | string |
CHAR | string |
DATE | date |
DATETIME | datetime |
DECIMAL(precision, scale) | decimal(precision, scale) |
DOUBLE | double |
ENUM | string |
FLOAT | single |
INT | int |
MEDIUMBLOB | binary |
MEDIUMINT | int |
MEDIUMTEXT | string |
NUMERIC(precision, scale) | decimal(precision, scale) |
SMALLINT | smallint |
TEXT | string |
TIME | time |
TIMESTAMP | datetime |
TINYBLOB | binary |
TINYINT | smallint |
TINYTEXT | string |
UNSIGNED BIGINT | bigint |
UNSIGNED INT | int |
UNSIGNED SMALLINT | smallint |
UNSIGNED TINYINT | smallint |
VARBINARY | binary |
VARCHAR | string |
YEAR | int |
