Skip to navigation

Supports:

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

Connection

Configuration

NameTypeDescriptionRequired
change_detectionbooleanUse replication for bulk syncsoptional
connection_namestringCloud SQL connection name

Takes the form of project:region:instance
required
credentialsstringService account keyrequired
databasestringDatabaserequired
passwordstringPassword

May be omitted when authenticating to Postgres using the service account key.
optional
usernamestringUsernameoptional

Example

{
"name": "Google Cloud MySQL connection",
"type": "googlecloudmysql",
"configuration": {
"change_detection": false,
"connection_name": "project:region:instance",
"credentials": "",
"database": "sampledb",
"password": "secret",
"username": "cloudsql"
}
}

Model Sync

Source

Configuration

NameTypeDescriptionRequired
querystringoptional
tablestringTableoptional
viewstringViewoptional

Example

{
...
"configuration": {
"query": "SELECT * from users",
"table": "users",
"view": "active_users"
}
}

Target

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

All targets

Configuration
NameTypeDescriptionRequired
created_columnstring’Created at’ timestamp columnoptional
preserve_table_on_resyncbooleanPreserve destination table when resyncingoptional
updated_columnstring’Updated at’ timestamp columnoptional
write_null_valuesbooleanCopy null values

When enabled updates will set fields to NULL when the source value is null
optional
write_record_timestampsbooleanWrite row timestamp metadataoptional
Example
{
...
"target": {
"configuration": {
"created_column": "",
"preserve_table_on_resync": false,
"updated_column": "",
"write_null_values": false,
"write_record_timestamps": false
}
}
}

Target creation

Google Cloud MySQL connections may be used to create a new target for a model sync. The following parameters are required to create a new target:

NAMEDESCRIPTIONENUM
nameTable namefalse

Bulk Sync

Source

Google Cloud MySQL connections may be used as a bulk sync source. No additional configuration options are required.

Destination

Configuration

NameTypeDescriptionRequired
advancedobjectoptional
mirror_schemasbooleanMirror schemasoptional
schemastringOutput schemaoptional

Example

{
...
"destination_configuration": {
"advanced": {
"empty_strings_null": true,
"hard_deletes": false,
"initial_execution": "rebuild",
"table_prefix": "",
"truncate_existing": false
},
"mirror_schemas": false,
"schema": "schema"
}
}

Type handling

Destination types

POLYTOMIC TYPEGOOGLE CLOUD MYSQL 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

GOOGLE CLOUD MYSQL TYPEPOLYTOMIC TYPE
BIGINTbigint
BITnumber
BLOBbinary
BLOBstring
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