Relyt has built-in pg_duckdb support, enabling the use of DuckDB to read CSV, Parquet, and JSON data from object storage and import it into the database.
read_csv()
functionread_parquet()
functionread_json()
function*
to match all files in the current directory:**
to recursively match all files in subdirectories:s3.ap-east-1.amazonaws.com
read_csv()
automatically detects format by default, but also supports manual parameter specification:
CREATE TABLE AS SELECT
with automatic schema inference and manual INSERT INTO SELECT
.
CREATE TABLE AS SELECT
creates a new table and automatically infers data types:
INSERT INTO SELECT
can insert data into existing tables:
INSERT INTO SELECT
method, read_xxx()
functions return data type as struct
(i.e., duckdb.row
), therefore manual column name and data type conversion specification is required.
column0
, column1
, column2
… as column names: