A PostgreSQL utility to export data into different formats like JSON, CSV, XLSX, and XML with custom template support.
pgclimb is a command-line tool for exporting data from PostgreSQL databases into various structured formats like JSON, CSV, XLSX, and XML. It serves as a flexible alternative to `psql` and `COPY TO` for data extraction, enabling users to publish datasets, generate reports, and create APIs. The tool supports custom templates for generating formats such as HTML or Markdown, and it automatically handles nested JSON serialization from complex queries.
Database administrators, data engineers, and developers who need to regularly extract and transform PostgreSQL data for reporting, API creation, or data distribution. It is particularly useful for those who require multi-format exports beyond basic CSV or JSON, such as Excel reports or custom templated outputs.
Developers choose pgclimb over alternatives because it offers built-in support for multiple output formats (including XLSX and XML) without requiring manual aggregation, and it provides extensibility through Go templates for custom formats. Its ability to automatically serialize complex queries into nested JSON structures and generate Excel files with multiple sheets simplifies data export workflows compared to using `psql` or `COPY TO` alone.
Export data from PostgreSQL into different data formats
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Exports to JSON, CSV, XLSX, XML, and more without additional tools, as shown in the README with clear examples for each format like CSV with custom delimiters and XLSX with multiple sheets.
Supports Go templates for generating custom formats such as HTML or Markdown reports, enabling extensibility beyond built-in exporters, demonstrated with a salary report template.
Serializes complex queries into nested JSON structures automatically, eliminating the need for manual json_agg in SQL, as illustrated in the JSON export examples.
Creates XLSX files with multiple sheets for comprehensive reporting, useful for distributing data to non-technical stakeholders, with examples in the README for adding different datasets to separate sheets.
The README admits that default XML export is lacking and relies on templates for control, which may require extra effort for proper XML output without custom work.
Requires downloading OS-specific binaries or Go installation, which is less convenient than integrated tools like psql that come with PostgreSQL, and Windows users must fetch binaries manually.
Lacks features for data cleaning or advanced transformation beyond basic SQL and templates, potentially necessitating external tools for complex ETL workflows.