How to specify a postgres and/or S3 secret? #169
-
If I try to use a non-default postgres secret, duckdb tells me that the SECRET option is not supported: ATTACH 'ducklake:postgres:dbname=postgres' AS my_ducklake (SECRET 'my_postgres'); Checking the code confirms that it isn't supported: https://github.com/duckdb/ducklake/blob/main/src/storage/ducklake_storage.cpp By the way, I've noticed that I need specify If attaching both postgres and S3, how to specify both secrets? CREATE OR REPLACE SECRET my_postgres (
TYPE postgres,
HOST 'aws-0-us-west-1.pooler.supabase.com',
PORT 6543,
DATABASE 'postgres',
USER 'postgres.my_project_slug',
PASSWORD '***'
);
CREATE OR REPLACE SECRET my_s3 (
TYPE s3,
PROVIDER config,
ENDPOINT 'my_project_slug.supabase.co/storage/v1/s3',
URL_STYLE 'path',
KEY_ID '***',
SECRET '***',
REGION 'us-west-1'
);
ATTACH 'ducklake:postgres:dbname=postgres'
AS my_ducklake (DATA_PATH 's3://files'); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
From @Mytherin
|
Beta Was this translation helpful? Give feedback.
-
Like this. CREATE OR REPLACE SECRET my_postgres (
TYPE postgres,
HOST 'aws-0-us-west-1.pooler.supabase.com',
PORT 6543,
DATABASE 'postgres',
USER 'postgres.my_project_slug',
PASSWORD '***'
);
CREATE OR REPLACE SECRET my_s3 (
TYPE s3,
PROVIDER config,
ENDPOINT 'my_project_slug.supabase.co/storage/v1/s3',
URL_STYLE 'path',
KEY_ID '***',
SECRET '***',
REGION 'us-west-1',
SCOPE 's3://files'
);
ATTACH 'ducklake:postgres:dbname=postgres'
AS my_ducklake (META_SECRET 'my_postgres', DATA_PATH 's3://files'); |
Beta Was this translation helpful? Give feedback.
From @Mytherin