Connection

Configuration

NAMETYPEDESCRIPTIONREQUIREDREADONLY
hostnamestringtruefalse
usernamestringtruefalse
passwordstringtruefalse
databasestringtruefalse
portintegertruefalse
sslbooleanfalsefalse
sshbooleanfalsefalse
ssh_userstringfalsefalse
ssh_hoststringfalsefalse
ssh_portintegerfalsefalse
ssh_private_keystringfalsefalse
client_certsbooleanfalsefalse
client_certificatestringfalsefalse
client_keystringfalsefalse
ca_certstringfalsefalse
change_detectionbooleanfalsefalse
publicationstringfalsefalse

Example

1{
2 "name": "postgresql connection",
3 "type": "postgresql",
4 "configuration": {
5 "ca_cert": "",
6 "change_detection": false,
7 "client_certificate": "",
8 "client_certs": false,
9 "client_key": "",
10 "database": "sampledb",
11 "hostname": "database.example.com",
12 "password": "password",
13 "port": 5432,
14 "publication": "polytomic",
15 "ssh": false,
16 "ssh_host": "bastion.example.com",
17 "ssh_port": 22,
18 "ssh_private_key": "",
19 "ssh_user": "",
20 "ssl": false,
21 "username": "postgres"
22 }
23}

Model Sync

Source

Configuration

NAMETYPEDESCRIPTIONREQUIREDREADONLY
querystringfalsefalse
tablestringTablefalsefalse
viewstringViewfalsefalse

Example

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

Target

Configuration

NAMETYPEDESCRIPTIONREQUIREDREADONLY
preserve_table_on_resyncbooleanPreserve destination table when resyncingfalsefalse
write_record_timestampsbooleanWrite row timestamp metadatafalsefalse
created_columnstring’Created at’ timestamp columnfalsefalse
updated_columnstring’Updated at’ timestamp columnfalsefalse

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}

Bulk Sync

Source

Configuration

NAMETYPEDESCRIPTIONREQUIREDREADONLY
mirror_tables_without_unique_idbooleanIf set to truefalsefalse
replication_slotstringLeave blank to allow Polytomic to manage a replication slot for this sync.falsefalse

Example

1{
2 ...
3 "source_configuration": {
4 "mirror_tables_without_unique_id": false,
5 "replication_slot": "polytomic"
6 }
7}

Destination

Configuration

NAMETYPEDESCRIPTIONREQUIREDREADONLY
advancedobjectfalsefalse
schemastringOutput schema to write tofalsefalse
mirror_schemasbooleanIndicates whether schemas should be mirroredfalsefalse

Example

1{
2 ...
3 "destination_configuration": {
4 "advanced": {
5 "table_prefix": "",
6 "truncate_existing": false
7 },
8 "mirror_schemas": false,
9 "schema": "public"
10 }
11}

Type handling

Destination types

POLYTOMIC TYPEPOSTGRESQL TYPE
array<>JSON
bigintINT8
booleanBOOL
dateDATE
datetimeTIMESTAMP
decimal(precision, scale)NUMERIC(precision,scale)
doubleDOUBLE PRECISION
intINT4
jsonJSON
jsonarrayJSON
numberNUMERIC
object{}JSON
singleREAL
smallintINT2
stringTEXT
timeTIME

Source types

POSTGRESQL TYPEPOLYTOMIC TYPE
ANYARRAYjsonarray
BPCHARstring
BYTEAjsonarray
CHARstring
CSTRINGstring
DATEdate
DOUBLE PRECISIONdouble
FLOATsingle
FLOAT4single
FLOAT8double
INTint
INT2smallint
INT4int
INT8bigint
INTERVALstring
JSONjson
JSONBjson
MONEYnumber
NAMEstring
NUMERIC(precision, scale)decimal(precision, scale)
REALsingle
TEXTstring
TIMEtime
TIMESTAMPdatetime
TIMESTAMPTZdatetime
TIMETZtime
UUIDstring
VARCHARstring
_BOOLjsonarray
_BPCHARjsonarray
_BYTEAjsonarray
_CHARjsonarray
_CSTRINGjsonarray
_DATEjsonarray
_FLOAT4jsonarray
_FLOAT8jsonarray
_INT2jsonarray
_INT2VECTORjsonarray
_INT4jsonarray
_INT8jsonarray
_JSONjsonarray
_JSONBjsonarray
_LSEGjsonarray
_MONEYjsonarray
_NAMEjsonarray
_NUMERICjsonarray
_PATHjsonarray
_TEXTjsonarray
_TIMEjsonarray
_TIMESTAMPjsonarray
_TIMESTAMPTZjsonarray
_TIMETZjsonarray
_UUIDjsonarray
_VARCHARjsonarray
_XMLjsonarray