Installation

This page collects the practical getting-started material for installing db2pq, choosing optional extras, and seeing the main workflow paths.

Installation

pip install --upgrade db2pq

Optional extras:

  • db2pq[sas]: WRDS SAS-side metadata checks for refresh logic such as wrds_update_pq(..., use_sas=True)
pip install --upgrade "db2pq[sas]"
  • db2pq[pandas]: pandas DataFrame outputs from metadata helpers such as pq_last_modified(...)
pip install --upgrade "db2pq[pandas]"
  • db2pq[ibis]: export PostgreSQL-backed Ibis expressions with ibis_to_pq(...)
pip install --upgrade "db2pq[ibis]"
  • db2pq[adbc]: use the Arrow-based export path with engine="adbc"
pip install --upgrade "db2pq[adbc]"

Quick example

from db2pq import wrds_update_pq

wrds_update_pq("dsi", "crsp")

This example uses the standard update-aware WRDS-to-Parquet path.

Main Paths

WRDS to Parquet

Export WRDS tables to Parquet files and update them only when the WRDS source is newer.

Open guide

WRDS to PostgreSQL

Materialize WRDS tables into a local PostgreSQL database and manage indexes or derived tables there.

Open guide

PostgreSQL to Parquet

Export local PostgreSQL tables or Ibis expressions into a Parquet repository.

Open guide

Parquet to PostgreSQL

Load Parquet repository tables back into PostgreSQL and refresh them when the Parquet source is newer.

Open guide

Learn More

Docs Build

This site uses quartodoc for API pages and Quarto for rendering.