MotherDuck

Supports:

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

Connection

Configuration

NameTypeDescriptionRequired
databasestringDatabasetrue
access_tokenstringAccess Tokentrue
aws_access_key_idstringAWS Access Key ID (destinations only)

Access Key ID with read/write access to a bucket.
false
aws_secret_access_keystringAWS Secret Access Key (destinations only)false
s3_bucket_namestringS3 Bucket Name (destinations only)

Bucket name (folder optional); ex: s3://polytomic/dataset
false
s3_bucket_regionstringS3 Bucket Region (destinations only)false

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 "database": "my_db",
9 "s3_bucket_name": "s3://polytomic/dataset",
10 "s3_bucket_region": "us-east-1"
11 }
12}

Read-only properties

NameTypeDescriptionRequired
aws_userstringUser ARNfalse

Model Sync

Source

Configuration

NameTypeDescriptionRequired
querystringfalse
tablestringTablefalse
viewstringViewfalse

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
NameTypeDescriptionRequired
preserve_table_on_resyncbooleanPreserve destination table when resyncingfalse
write_record_timestampsbooleanWrite row timestamp metadatafalse
created_columnstring’Created at’ timestamp columnfalse
updated_columnstring’Updated at’ timestamp columnfalse
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

NameTypeDescriptionRequired
advancedobjectfalse
mirror_schemasbooleanMirror schemasfalse
schemastringOutput schemafalse

Example

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

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{}JSON
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
TIME WITH TIME ZONEtime
TIME WITHOUT TIME ZONEtime
TIMESTAMPdatetime
TIMESTAMP WITH TIME ZONEdatetime_tz
TIMESTAMP WITHOUT TIME ZONEdatetime
TIMESTAMPTZdatetime_tz
TIMETZtime
TINYINTsmallint
UBIGINTbigint
UHUGEINTbigint
UINTEGERint
USMALLINTsmallint
UTINYINTsmallint
UUIDstring