Skip to navigation

Supports:

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

Connection

Configuration

NameTypeDescriptionRequired
change_detectionbooleanUse change data capture for bulk syncsoptional
databasestringDatabaserequired
hostnamestringServerrequired
passwordstringPasswordrequired
portintegerPortrequired
sshbooleanConnect over SSH tunnel ↓optional
sslbooleanUse SSLoptional
usernamestringUsernamerequired

ssh

When ssh is true:

NameTypeDescriptionRequired
ssh_hoststringSSH hostrequired
ssh_portintegerSSH portrequired
ssh_private_keystringPrivate keyrequired
ssh_userstringSSH userrequired
{
"name": "Microsoft SQL Server connection",
"type": "mssql",
"configuration": {
"change_detection": false,
"database": "sampledb",
"hostname": "example.database.windows.net",
"password": "secret",
"port": 1433,
"ssh": true,
"ssh_host": "bastion.example.com",
"ssh_port": 22,
"ssh_private_key": "",
"ssh_user": "root",
"ssl": true,
"username": "user"
}
}

Example

{
"name": "Microsoft SQL Server connection",
"type": "mssql",
"configuration": {
"change_detection": false,
"database": "sampledb",
"hostname": "example.database.windows.net",
"password": "secret",
"port": 1433,
"ssh": false,
"ssl": true,
"username": "user"
}
}

Model Sync

Source

Configuration

NameTypeDescriptionRequired
querystringoptional
tablestringTableoptional
viewstringViewoptional

Example

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

Target

Microsoft SQL Server 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

Microsoft SQL Server 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

Microsoft SQL Server 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 TYPEMICROSOFT SQL SERVER TYPE
array<>NVARCHAR(MAX)
bigintBIGINT
booleanBIT
dateDATE
datetimeDATETIMEOFFSET
decimal(precision, scale)DECIMAL(precision,scale)
doubleFLOAT
intINT
jsonNVARCHAR(MAX)
jsonarrayNVARCHAR(MAX)
numberNUMERIC(38,10)
object{}NVARCHAR(MAX)
singleREAL
smallintSMALLINT
stringNVARCHAR(4000)
timeTIME

Source types

MICROSOFT SQL SERVER TYPEPOLYTOMIC TYPE
BIGINTbigint
CHARstring
DATEdate
DATETIMEdatetime
DATETIME2datetime
DATETIMEOFFSETdatetime
DECIMALnumber
DECIMAL(precision, scale)decimal(precision, scale)
FLOATdouble
INTint
MONEYdecimal(precision, scale)
NCHARstring
NTEXTstring
NUMBER(precision, scale)decimal(precision, scale)
NUMERICnumber
NUMERIC(precision, scale)decimal(precision, scale)
NVARCHARstring
REALsingle
SMALLDATETIMEdatetime
SMALLINTsmallint
SMALLMONEYdecimal(precision, scale)
TEXTstring
TIMEtime
TINYINTsmallint
UNIQUEIDENTIFIERstring
VARCHARstring
XMLstring