MotherDuck
Supports:
- ✅ Models
- ✅ Model sync destination
- ✅ Bulk sync source
- ✅ Bulk sync destination
Connection
Configuration
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
database | string | true | false | |
access_token | string | true | false | |
aws_access_key_id | string | Access Key ID with read/write access to a bucket. | true | false |
aws_secret_access_key | string | true | false | |
aws_user | string | false | false | |
s3_bucket_name | string | Bucket name (folder optional); ex: s3://polytomic/dataset | true | false |
s3_bucket_region | string | true | 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 "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
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
MotherDuck connections may be used as the destination in a model sync.
All targets
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
Destination
Configuration
NAME | TYPE | DESCRIPTION | REQUIRED | READONLY |
---|---|---|---|---|
advanced | object | false | false | |
schema | string | Output schema | false | false |
mirror_schemas | boolean | Mirror schemas | false | false |
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 TYPE | MOTHERDUCK TYPE |
---|---|
array<> | VARCHAR[] |
bigint | BIGINT |
boolean | BOOLEAN |
date | DATE |
datetime | TIMESTAMP |
decimal(precision, scale) | DECIMAL(precision,scale) |
double | DOUBLE |
int | INTEGER |
json | JSON |
jsonarray | JSON |
number | DECIMAL(38,18) |
object{} | STRUCT() |
single | REAL |
smallint | SMALLINT |
string | VARCHAR |
time | TIME |
Source types
MOTHERDUCK TYPE | POLYTOMIC TYPE |
---|---|
BIGINT | bigint |
BPCHAR | string |
CHAR | string |
DATE | date |
DECIMAL | number |
DECIMAL(precision, scale) | decimal(precision, scale) |
DOUBLE | double |
FLOAT | single |
FLOAT4 | single |
FLOAT8 | double |
HUGEINT | bigint |
INTEGER | int |
INTERVAL | string |
LIST | array<> |
MAP() | object{} |
REAL | single |
SMALLINT | smallint |
STRING | string |
STRUCT() | object{} |
TEXT | string |
TIME | time |
TIMESTAMP | datetime |
TIMESTAMPTZ | datetime_tz |
TIMETZ | time |
TINYINT | smallint |
UBIGINT | bigint |
UHUGEINT | bigint |
UINTEGER | int |
USMALLINT | smallint |
UTINYINT | smallint |
UUID | string |