Both connectors are available on Meltano Hub. Here's how to set it up:
meltano init my-project
cd my-project
meltano add extractor tap-postgres
meltano add loader target-ducklake --variant=definite
You can configure via CLI or directly in meltano.yml:
# Postgres source
meltano config tap-postgres set host localhost
meltano config tap-postgres set port 5432
meltano config tap-postgres set user your_user
meltano config tap-postgres set password your_password
meltano config tap-postgres set database your_database
meltano config tap-postgres set default_replication_method FULL_TABLE
# DuckLake target
meltano config target-ducklake set ducklake_connection_string "ducklake:md:my_ducklake?motherduck_token=xxx"
meltano config target-ducklake set default_target_schema raw
Or in meltano.yml:
plugins:
extractors:
- name: tap-postgres
variant: meltanolabs
config:
host: localhost
port: 5432
user: your_user
password: your_password
database: your_database
default_replication_method: FULL_TABLE
loaders:
- name: target-ducklake
variant: definite
config:
ducklake_connection_string: "ducklake:md:my_ducklake?motherduck_token=xxx"
default_target_schema: raw
meltano run tap-postgres target-ducklake
Or with the older elt command:
meltano elt tap-postgres target-ducklake --job_id=postgres-to-ducklake
meltano select tap-postgres public-users "*"MELTANO_LOG_LEVEL=debug meltano run tap-postgres target-ducklakemeltano invoke tap-postgres --discover > catalog.jsonThe target-ducklake is the Definite variant—it supports DuckLake's iceberg-style table format with options like auto_cast_timestamps, batch_size_rows, and partition_fields for more advanced setups.