pg_parquet
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_parquet | 0.5.1 | OLAP | PostgreSQL | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2480 | pg_parquet | No | Yes | Yes | Yes | No | No | - |
| Related | file_fdw aws_s3 pg_bulkload pg_lake pg_ducklake pg_duckdb pg_mooncake pg_fact_loader pg_csv omni_csv |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.5.1 | 1817161514 | pg_parquet | - |
| RPM | PIGSTY | 0.5.1 | 1817161514 | pg_parquet_$v | - |
| DEB | PIGSTY | 0.5.1 | 1817161514 | postgresql-$v-pg-parquet | - |
Build
You can build the RPM / DEB packages for pg_parquet using pig build:
Install
You can install pg_parquet directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
There are mainly 3 things that you can do with pg_parquet:
- You can export Postgres tables/queries to Parquet files,
- You can ingest data from Parquet files to Postgres tables,
- You can inspect the schema and metadata of Parquet files.
COPY to/from Parquet files from/to Postgres tables
You can use PostgreSQL’s COPY command to read and write from/to Parquet files. Below is an example of how to write a PostgreSQL table, with complex types, into a Parquet file and then to read the Parquet file content back into the same table.
You can also use COPY command to read and write Parquet stream from/to standard input and output. Below is an example usage (you have to specify format = parquet):
Inspect Parquet schema
You can call SELECT * FROM parquet.schema(<uri>) to discover the schema of the Parquet file at given uri.
Inspect Parquet metadata
You can call SELECT * FROM parquet.metadata(<uri>) to discover the detailed metadata of the Parquet file, such as column statistics, at given uri.
You can call SELECT * FROM parquet.file_metadata(<uri>) to discover file level metadata of the Parquet file, such as format version, at given uri.
You can call SELECT * FROM parquet.kv_metadata(<uri>) to query custom key-value metadata of the Parquet file at given uri.
Inspect Parquet column statistics
You can call SELECT * FROM parquet.column_stats(<uri>) to discover the column statistics of the Parquet file, such as min and max value for the column, at given uri.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)