Connection
Configuration
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
hostname | string | true | false | |
username | string | true | false | |
password | string | true | false | |
database | string | true | 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 | |
client_certs | boolean | false | false | |
client_certificate | string | false | false | |
client_key | string | false | false | |
ca_cert | string | false | false | |
change_detection | boolean | false | false | |
publication | string | false | false |
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
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 }
Bulk Sync
Source
Configuration
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
mirror_tables_without_unique_id | boolean | If set to true | false | false |
replication_slot | string | Leave blank to allow Polytomic to manage a replication slot for this sync. | false | false |
Example
1 { 2 ... 3 "source_configuration": { 4 "mirror_tables_without_unique_id": false, 5 "replication_slot": "polytomic" 6 } 7 }
Destination
Configuration
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
advanced | object | false | false | |
schema | string | Output schema to write to | false | false |
mirror_schemas | boolean | Indicates whether schemas should be mirrored | false | false |
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 TYPE | POSTGRESQL TYPE |
---|---|
array<> | JSON |
bigint | INT8 |
boolean | BOOL |
date | DATE |
datetime | TIMESTAMP |
decimal(precision, scale) | NUMERIC(precision,scale) |
double | DOUBLE PRECISION |
int | INT4 |
json | JSON |
jsonarray | JSON |
number | NUMERIC |
object{} | JSON |
single | REAL |
smallint | INT2 |
string | TEXT |
time | TIME |
Source types
POSTGRESQL TYPE | POLYTOMIC TYPE |
---|---|
ANYARRAY | jsonarray |
BPCHAR | string |
BYTEA | jsonarray |
CHAR | string |
CSTRING | string |
DATE | date |
DOUBLE PRECISION | double |
FLOAT | single |
FLOAT4 | single |
FLOAT8 | double |
INT | int |
INT2 | smallint |
INT4 | int |
INT8 | bigint |
INTERVAL | string |
JSON | json |
JSONB | json |
MONEY | number |
NAME | string |
NUMERIC(precision, scale) | decimal(precision, scale) |
REAL | single |
TEXT | string |
TIME | time |
TIMESTAMP | datetime |
TIMESTAMPTZ | datetime |
TIMETZ | time |
UUID | string |
VARCHAR | string |
_BOOL | jsonarray |
_BPCHAR | jsonarray |
_BYTEA | jsonarray |
_CHAR | jsonarray |
_CSTRING | jsonarray |
_DATE | jsonarray |
_FLOAT4 | jsonarray |
_FLOAT8 | jsonarray |
_INT2 | jsonarray |
_INT2VECTOR | jsonarray |
_INT4 | jsonarray |
_INT8 | jsonarray |
_JSON | jsonarray |
_JSONB | jsonarray |
_LSEG | jsonarray |
_MONEY | jsonarray |
_NAME | jsonarray |
_NUMERIC | jsonarray |
_PATH | jsonarray |
_TEXT | jsonarray |
_TIME | jsonarray |
_TIMESTAMP | jsonarray |
_TIMESTAMPTZ | jsonarray |
_TIMETZ | jsonarray |
_UUID | jsonarray |
_VARCHAR | jsonarray |
_XML | jsonarray |