BigQuery cost optimization and governance audit CLI tool
Project description
🚀 DWH-Auditor
📚 Official Documentation: https://shirokurolab.github.io/dwh-auditor/
DWH-Auditor is an open-source CLI tool that parses BigQuery metadata to instantly perform cost optimization and data governance auditing to prevent runaway cloud costs.
By visualizing exactly who is executing heavy queries and which tables are completely unused, it uncovers hidden financial waste and provides actionable insights.
💡 Why DWH-Auditor?
While BigQuery is extremely powerful, its pay-as-you-go pricing model means that a single inefficient query or an abandoned, massive table can stealthily generate thousands of dollars in wasted costs every month.
DWH-Auditor analyzes your INFORMATION_SCHEMA seamlessly without any complex configurations, delivering a "health check" for your data infrastructure in seconds. Because it never accesses your actual table data, it can be safely executed even in strict, highly secure enterprise environments.
✨ Key Features
- 💸 Identifying High-Cost Queries: Aggregates billed bytes over the past N days and surfaces the Top 10 most expensive ad-hoc queries.
- 🔄 Recurring Execution Alerts: Detects dashboards or batch processes that are running expensive queries on a recurring schedule.
- 🚨 Detecting Full Table Scans (Anti-patterns): Warns you about inefficient queries, such as full table scans caused by missing partition filters.
- 🧟 Identifying Zombie Tables: Locates storage-heavy tables that haven't been queried for a long time, enabling swift storage cost reductions.
- 📊 Multi-Format Reporting: Integrates effortlessly into your CI/CD pipelines (e.g. GitHub Actions) to share daily audit reports in Markdown or JSON to your team.
🛠 Quickstart
1. Installation
pip install dwh-auditor
2. Initialization
dwh-auditor init
A config.yaml file will be generated in the current directory. Adjust the cost rates and warning thresholds as necessary to fit your environment.
3. Execution
# Example: Analyze the past 30 days for my-gcp-project
dwh-auditor analyze --project my-gcp-project --days 30 --output console
4. 🔐 Security (Zero Data Access)
DWH-Auditor strictly reads metadata (INFORMATION_SCHEMA) from BigQuery and never reads actual table records. It operates flawlessly under the principle of least privilege, requiring only roles/bigquery.metadataViewer and roles/bigquery.resourceViewer.
5. 💼 Enterprise Support & Data Infrastructure Consulting
DWH-Auditor is a powerful diagnostic tool for uncovering issues in your data platform. However, resolving severe structural issues—such as redesigning complex data models or refactoring massive query pipelines—can often be challenging to handle with internal resources alone.
If you are facing these challenges, the developer behind this tool (Data Engineer) offers direct support and professional consulting:
- "DWH-Auditor detected massive full table scans, but we don't know how to redesign partitions without breaking existing BI/ETL workflows."
- "We want to migrate a collection of legacy SQL scripts to modern data modeling using dbt."
- "We need to integrate this tool into our CI/CD pipeline to establish continuous data governance."
6. 👉 Contact Us
Feel free to reach out at shirokurolab.oss.tools@gmail.com. Initial consultations and high-level cost reduction assessments are provided completely free of charge.
7. 🤝 Contributing
We heartily welcome bug reports and Pull Requests! If you want to contribute, please check CONTRIBUTING.md for instructions on setting up your development environment.
8. 📜 License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dwh_auditor-0.2.3.tar.gz.
File metadata
- Download URL: dwh_auditor-0.2.3.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60d3387584f90bd837e21fe579a107d3b2d0851cbacb853d6873a36e906d3658
|
|
| MD5 |
1154ea49b45361b30bdd0efdd7227fa7
|
|
| BLAKE2b-256 |
ea1238062830b1537dc89de54e5302d7c1508d8cfd53701e5383593257e7cc68
|
Provenance
The following attestation bundles were made for dwh_auditor-0.2.3.tar.gz:
Publisher:
cd.yml on shirokurolab/dwh-auditor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dwh_auditor-0.2.3.tar.gz -
Subject digest:
60d3387584f90bd837e21fe579a107d3b2d0851cbacb853d6873a36e906d3658 - Sigstore transparency entry: 1280900030
- Sigstore integration time:
-
Permalink:
shirokurolab/dwh-auditor@48d43d6873e5b287baf40313f40c793ab734a383 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/shirokurolab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@48d43d6873e5b287baf40313f40c793ab734a383 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dwh_auditor-0.2.3-py3-none-any.whl.
File metadata
- Download URL: dwh_auditor-0.2.3-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd38e151581940752dba5f328412392017c514a58675fe4ac0ed62257c05bbbb
|
|
| MD5 |
f5483e04b9d381e5b85b04abc372a6a0
|
|
| BLAKE2b-256 |
c1b00bc4a7b3a7d773f8204d2ec7cc26c0d8efc65f6344b391f791ccdcd8ab95
|
Provenance
The following attestation bundles were made for dwh_auditor-0.2.3-py3-none-any.whl:
Publisher:
cd.yml on shirokurolab/dwh-auditor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dwh_auditor-0.2.3-py3-none-any.whl -
Subject digest:
fd38e151581940752dba5f328412392017c514a58675fe4ac0ed62257c05bbbb - Sigstore transparency entry: 1280900035
- Sigstore integration time:
-
Permalink:
shirokurolab/dwh-auditor@48d43d6873e5b287baf40313f40c793ab734a383 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/shirokurolab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@48d43d6873e5b287baf40313f40c793ab734a383 -
Trigger Event:
release
-
Statement type: