Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /sustainability-software-lab_ca-biositing /scripts /check_counts.py
| import os | |
| import pandas as pd | |
| from sqlalchemy import text | |
| os.environ["POSTGRES_HOST"] = "localhost" | |
| from ca_biositing.datamodels.database import get_engine | |
| def main(): | |
| engine = get_engine() | |
| tables = [ | |
| 'xrd_record', 'ftnir_record', 'fermentation_record', | |
| 'pretreatment_record', 'gasification_record' | |
| ] | |
| for table in tables: | |
| try: | |
| with engine.connect() as conn: | |
| count = conn.execute(text(f"SELECT COUNT(*) FROM {table}")).scalar() | |
| print(f"{table}: {count}") | |
| except Exception as e: | |
| print(f"Error checking {table}: {e}") | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 659 Bytes
- Xet hash:
- 7ff83d56a31cce49722c349a8a106215a9ae82512fa34a8a8bdf484c7cbecce3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.