MotherDuck
Supports:
- ✅ Models
- ✅ Model sync destination
- ✅ Bulk sync source
- ✅ Bulk sync destination
Connection
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
database | string | Database | true |
access_token | string | Access Token | true |
aws_access_key_id | string | AWS Access Key ID (destinations only) Access Key ID with read/write access to a bucket. | false |
aws_secret_access_key | string | AWS Secret Access Key (destinations only) | false |
s3_bucket_name | string | S3 Bucket Name (destinations only) Bucket name (folder optional); ex: s3://polytomic/dataset | false |
s3_bucket_region | string | S3 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
| Name | Type | Description | Required |
|---|---|---|---|
aws_user | string | User ARN | false |
Model Sync
Source
Configuration
| Name | Type | Description | Required |
|---|---|---|---|
query | string | false | |
table | string | Table | false |
view | string | View | 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 |
|---|---|---|---|
preserve_table_on_resync | boolean | Preserve destination table when resyncing | false |
write_record_timestamps | boolean | Write row timestamp metadata | false |
created_column | string | ’Created at’ timestamp column | false |
updated_column | string | ’Updated at’ timestamp column | 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 |
|---|---|---|---|
advanced | object | false | |
mirror_schemas | boolean | Mirror schemas | false |
schema | string | Output schema | false |
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 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{} | JSON |
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 |
TIME WITH TIME ZONE | time |
TIME WITHOUT TIME ZONE | time |
TIMESTAMP | datetime |
TIMESTAMP WITH TIME ZONE | datetime_tz |
TIMESTAMP WITHOUT TIME ZONE | datetime |
TIMESTAMPTZ | datetime_tz |
TIMETZ | time |
TINYINT | smallint |
UBIGINT | bigint |
UHUGEINT | bigint |
UINTEGER | int |
USMALLINT | smallint |
UTINYINT | smallint |
UUID | string |
