https://github.com/mauricekuenicke/echosphere
CLI Database Testing
https://github.com/mauricekuenicke/echosphere
cicd-pipeline database databricks postgresql python snowflake testing
Last synced: about 2 months ago
JSON representation
CLI Database Testing
- Host: GitHub
- URL: https://github.com/mauricekuenicke/echosphere
- Owner: MauriceKuenicke
- Created: 2025-02-01T09:49:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-10T18:03:35.000Z (10 months ago)
- Last Synced: 2025-09-10T20:25:38.562Z (10 months ago)
- Topics: cicd-pipeline, database, databricks, postgresql, python, snowflake, testing
- Language: Python
- Homepage: https://mauricekuenicke.github.io/EchoSphere/
- Size: 808 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- Support: docs/supported-platforms/index.md
Awesome Lists containing this project
README
pytest for databases
Test your database like you test your code.
Documentation
·
Get Started
·
EchoSphere vs Soda
·
AI Era Approach
·
Examples
·
Issues
---
## EchoSphere = pytest for databases
EchoSphere is a SQL-first CLI test framework for databases and data warehouses.
You keep tests in Git, run them in CI, and get failure output as rows directly from the query.
## Core message
> Test your database like you test your code.
Without DSL. Without Cloud. Without onboarding processes.
## Why teams choose EchoSphere
- No DSL: write tests as plain `.es.sql` files.
- No cloud dependency: run locally and in CI with `es`.
- No onboarding ceremony: `es init`, write tests, run tests.
- Developer-native workflow: PR review, tags, CI gate, repeat.
- Deterministic pass/fail model: zero rows = pass.
## EchoSphere vs Soda (short version)
> Soda: "Define what good data looks like."
> EchoSphere: "Test your database like you test your code."
| Category | Soda (typical positioning) | EchoSphere |
| --- | --- | --- |
| Abstraction | Checks/policies + SQL options | Plain SQL tests (`.es.sql`) |
| Workflow center | Platform/onboarding oriented | Git + CLI + CI |
| Execution style | Workspace/process driven | Local-first + pipeline-native |
| Failure signal | Check-level status | Failing rows from SQL |
Read the full comparison: https://mauricekuenicke.github.io/EchoSphere/why-echosphere/vs-soda/
## Supported connectors
## Quick start
### Installation
```sh
pip install "EchoSphere[snowflake,postgres] @ git+https://github.com/MauriceKuenicke/EchoSphere.git"
```
### First setup
```sh
es init --platform sqlite
# or local guided starter:
es init --platform tutorial
```
This scaffolds `es_suite/` and `es.ini`.
`tutorial` also creates and seeds a local SQLite DB.
### Write your first test
Create `es_suite/my_first_test.es.sql`:
```sql
-- @name: Orders Total Validation
-- @tag: critical, nightly
SELECT *
FROM (
SELECT SUM(O_TOTALPRICE) AS "SUM_TOTALPRICE"
FROM ORDERS
WHERE O_ORDERDATE = '1995-02-19'
)
WHERE "SUM_TOTALPRICE" <> 944870465.07;
```
If this query returns rows, the test fails. Zero rows means pass.
### Run tests
```sh
# default environment
es run
# target environment
es run -e env.snowflake.dev
# tag filtering
es run --tag critical
es run --tag nightly --exclude-tag slow
```
Run with exports:
```sh
es run --junitxml test_result.xml --export-failures failures.xlsx
```
Inspect test inventory or SQL:
```sh
es view tests --all
es view test my_first_test
```
## Community & support
- Issues & Feature Requests: https://github.com/MauriceKuenicke/EchoSphere/issues
- Source Code: https://github.com/MauriceKuenicke/EchoSphere
## Important
This project is early-stage. Proceed at your own risk.
## Environment management
Manage multiple Snowflake environments in es.ini:
```ini
[default]
env = env.snowflake.dev
[env.snowflake.dev]
user = ...
password = ...
account = ...
warehouse = ...
role = ...
database = ...
schema = ...
```
Switch env at runtime:
```sh
es run -e env.snowflake.dev
```
## Planned connectors
- [ ] Amazon Redshift
- [ ] Google BigQuery
- [ ] Firebolt
- [ ] Azure Synapse
- [ ] Microsoft SQL Server
### Development
```sh
pip install -e .[dev]
```