API Reference

Parquet Export

Helpers for exporting PostgreSQL and WRDS data into Parquet files.

core.db_to_pq Export a PostgreSQL table to a Parquet file.
core.pg_update_pq Export a local PostgreSQL table to Parquet when the source is newer.
core.wrds_pg_to_pq Export a table from the WRDS PostgreSQL database to a parquet file.
core.wrds_sql_to_pq Run a SQL query against WRDS PostgreSQL and write the result to Parquet.
core.db_schema_to_pq Export all tables in a PostgreSQL schema to Parquet files.
core.wrds_update_pq Export a table from the WRDS PostgreSQL database to a Parquet file.
core.wrds_update_schema Update existing parquet files in a schema.
ibis.ibis_to_pq Write an Ibis PostgreSQL table expression to a parquet file.

PostgreSQL Sync

Helpers for materializing WRDS, PostgreSQL, and Parquet data into PostgreSQL.

core.db_to_pg Write a PostgreSQL table to another PostgreSQL database.
core.wrds_pg_to_pg Write a WRDS PostgreSQL table to another PostgreSQL database.
postgres.update.wrds_update_pg Materialize a WRDS PostgreSQL table into a local PostgreSQL database.
postgres.update.pq_to_pg Write a parquet file from the local repository into PostgreSQL.
postgres.update.pq_update_pg Materialize a parquet file into PostgreSQL when the parquet source is newer.
postgres.update.process_sql Execute SQL against the destination PostgreSQL database used by
postgres.schema.db_schema_tables Get a list of relations in a PostgreSQL schema.
postgres.schema.wrds_get_tables Get a list of relations in a WRDS schema.
postgres.comments.set_table_comment Set (or clear) a PostgreSQL table comment using psycopg.

Parquet Utilities

Helpers for managing and inspecting parquet files produced by db2pq.

files.paths.pq_list_files Get a list of parquet files in a schema or its archive directory.
files.parquet.pq_last_modified Get last-updated metadata for parquet data files.
files.parquet.pq_archive Archive a parquet file by renaming it into an archive subdirectory.
files.parquet.pq_restore Restore an archived parquet file into the schema directory.
files.parquet.pq_remove Remove a parquet file from active or archive storage.

Configuration

Helpers for engine defaults and runtime behavior.

config.set_default_engine Set the session-wide default engine used by db2pq helpers to create
config.get_default_engine Return the default engine used by db2pq helpers.