MotherDuck

Supports:

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

Connection

Configuration

NAMETYPEDESCRIPTIONREQUIREDREADONLY
databasestringtruefalse
access_tokenstringtruefalse
aws_access_key_idstringAccess Key ID with read/write access to a bucket.truefalse
aws_secret_access_keystringtruefalse
aws_userstringfalsefalse
s3_bucket_namestringBucket name (folder optional); ex: s3://polytomic/datasettruefalse
s3_bucket_regionstringtruefalse

Example

1{
2 "name": "MotherDuck connection",
3 "type": "motherduck",
4 "configuration": {
5 "access_token": "",
6 "aws_access_key_id": "AKIAIOSFODNN7EXAMPLE",
7 "aws_secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
8 "aws_user": "",
9 "database": "my_db",
10 "s3_bucket_name": "s3://polytomic/dataset",
11 "s3_bucket_region": "us-east-1"
12 }
13}

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

MotherDuck connections may be used as the destination in a model sync.

All targets

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

Destination

Configuration

NAMETYPEDESCRIPTIONREQUIREDREADONLY
advancedobjectfalsefalse
schemastringOutput schemafalsefalse
mirror_schemasbooleanMirror schemasfalsefalse

Example

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

Type handling

Destination types

POLYTOMIC TYPEMOTHERDUCK TYPE
array<>VARCHAR[]
bigintBIGINT
booleanBOOLEAN
dateDATE
datetimeTIMESTAMP
decimal(precision, scale)DECIMAL(precision,scale)
doubleDOUBLE
intINTEGER
jsonJSON
jsonarrayJSON
numberDECIMAL(38,18)
object{}STRUCT()
singleREAL
smallintSMALLINT
stringVARCHAR
timeTIME

Source types

MOTHERDUCK TYPEPOLYTOMIC TYPE
BIGINTbigint
BPCHARstring
CHARstring
DATEdate
DECIMALnumber
DECIMAL(precision, scale)decimal(precision, scale)
DOUBLEdouble
FLOATsingle
FLOAT4single
FLOAT8double
HUGEINTbigint
INTEGERint
INTERVALstring
LISTarray<>
MAP()object{}
REALsingle
SMALLINTsmallint
STRINGstring
STRUCT()object{}
TEXTstring
TIMEtime
TIMESTAMPdatetime
TIMESTAMPTZdatetime_tz
TIMETZtime
TINYINTsmallint
UBIGINTbigint
UHUGEINTbigint
UINTEGERint
USMALLINTsmallint
UTINYINTsmallint
UUIDstring