GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Quantco/sqlcompyre: Python package for comparing SQL tables and databases.

BranchesTags
Open more actions menu

Latest commit

 

History

51 Commits
51 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
.github
.github
 
 
docs
docs
 
 
sqlcompyre
sqlcompyre
 
 
tests
tests
 
 
.copier-answers.yml
.copier-answers.yml
 
 
.envrc
.envrc
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.lefthook.yaml
.lefthook.yaml
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
.readthedocs.yaml
.readthedocs.yaml
 
 
AGENTS.md
AGENTS.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
docker-compose.yml
docker-compose.yml
 
 
pixi.lock
pixi.lock
 
 
pixi.toml
pixi.toml
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

SQLCompyre

CI conda-forge Documentation pypi-version python-version

SQLCompyre is a simple Python package that allows you to find and explore the differences between SQL tables, schemas, and entire databases. It provides both a Python interface and a CLI, allowing it to be used for both ad-hoc comparisons as well as in-depth analyses.

SQLCompyre is designed to be dialect-agnostic and should, thus, work with most database systems out-of-the-box.

Usage example

Given a connection to a database, this snippet will print a report of the differences between two tables:

import sqlalchemy as sa
import sqlcompyre as sc

engine = sa.create_engine("<your_connection_string>")
comparison = sc.compare_tables(engine, "<left table name>", "<right table name>")

report = comparison.summary_report()
print(report)

To find more examples and get started, please visit the documentation.

Installation

SQLCompyre can be installed via pip or conda:

pip install sqlcompyre
# or
micromamba install sqlcompyre
# or
conda install sqlcompyre

Details on its usage can be found in the documentation.

Development

This project is managed by pixi. You can install the package in development mode using:

git clone https://github.com/quantco/sqlcompyre
cd sqlcompyre

pixi run pre-commit-install
pixi run test

Running Tests Locally

  1. Make sure you have msodbcsql18 installed, or install it here

  2. Make sure you have Docker installed, or install it here

  3. Create a local test database with the following command:

docker compose up
  1. Set environment variable
export DB_CONNECTION_STRING="mssql+pyodbc://sa:Passw0rd@localhost:1435/master?driver=ODBC+Driver+18+for+SQL+Server&Encrypt=no"
  1. Navigate to the main directory of this repository and run pytest.
pixi run test

About

Python package for comparing SQL tables and databases.

sqlcompyre.readthedocs.io/en/latest/

Topics

pythonsql

Resources

Readme
BSD-3-Clause license

Security policy

Security policy
Activity
Custom properties

Stars

4 stars

Watchers

6 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.