Parquet Import
Import Parquet files into DB9 tables using COPY ... FORMAT parquet from HTTP URLs. No external tools or ETL pipelines are required.
Installation
Section titled “Installation”CREATE EXTENSION parquet;COPY FROM Parquet
Section titled “COPY FROM Parquet”Use COPY ... FORMAT parquet to import Parquet data from an HTTP URL into an existing table:
-- Import from HTTP URLCOPY my_table FROM 'https://example.com/export.parquet' FORMAT parquet;The Parquet file schema must be compatible with the target table. Column names are matched by name (case-insensitive). Extra columns in the Parquet file are ignored.
Type Mapping
Section titled “Type Mapping”Parquet physical types are mapped to PostgreSQL types during COPY FROM:
| Parquet Type | PostgreSQL Type |
|---|---|
BOOLEAN | BOOLEAN |
INT32 | INTEGER |
INT64 | BIGINT |
FLOAT | REAL |
DOUBLE | DOUBLE PRECISION |
BYTE_ARRAY (UTF8) | TEXT |
BYTE_ARRAY (binary) | BYTEA |
INT96 (timestamp) | TIMESTAMP |
DATE logical type | DATE |
TIME logical type | TIME |
TIMESTAMP logical type | TIMESTAMP |
DECIMAL logical type | NUMERIC |
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Max Parquet file size | 100 MB |
| Supported Parquet versions | v1, v2 |
| Max columns per file | Unlimited (practical limit: storage) |
| Remote URL fetch timeout | 30 seconds |
| Supported compression codecs | Snappy, Gzip, Zstd, uncompressed |
See Limits and Quotas for the complete list.
Error Messages
Section titled “Error Messages”| Error | Cause |
|---|---|
ERROR: unknown function: READ_PARQUET | read_parquet() is not yet available. Use COPY FROM instead. |
parquet: HTTP fetch failed (status 404) | The remote URL returned a 404. Verify the URL is accessible. |
parquet: HTTP fetch failed (timeout) | Remote fetch exceeded 30 seconds. |
parquet: invalid magic bytes | The file is not a valid Parquet file. |
parquet: unsupported encoding | File uses an unsupported encoding. Re-export with Snappy or Gzip compression. |
parquet: file too large (max 100 MB) | File exceeds the 100 MB limit. Split into smaller files. |
ERROR: column "x" does not exist | COPY target table is missing a column present in the Parquet file. |
ERROR: Only http:// and https:// URLs are supported | fs9 paths are not supported for Parquet COPY. Use an HTTP URL. |
Next Steps
Section titled “Next Steps”- HTTP from SQL — Fetch Parquet files from external HTTP endpoints
- Extensions Overview — All 9 built-in extensions
- Limits and Quotas — All operational limits