{"id":45469242,"url":"https://github.com/attapon-th/dbhelper","last_synced_at":"2026-02-22T10:50:59.976Z","repository":{"id":90474616,"uuid":"468638941","full_name":"attapon-th/dbhelper","owner":"attapon-th","description":"#PYTHON #DATABASE #MYSQL #VERTICA #PARQUST #CSV","archived":false,"fork":false,"pushed_at":"2024-02-15T06:06:59.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-15T07:24:27.327Z","etag":null,"topics":["csv","database","mysql","parquet","python","vertica"],"latest_commit_sha":null,"homepage":"https://attapon-th.github.io/dbhelper","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/attapon-th.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-03-11T06:42:04.000Z","updated_at":"2024-02-15T07:24:30.514Z","dependencies_parsed_at":"2024-02-15T07:24:29.681Z","dependency_job_id":"04a04291-8ce5-421a-b07e-ab361d359027","html_url":"https://github.com/attapon-th/dbhelper","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/attapon-th/dbhelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attapon-th%2Fdbhelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attapon-th%2Fdbhelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attapon-th%2Fdbhelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attapon-th%2Fdbhelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/attapon-th","download_url":"https://codeload.github.com/attapon-th/dbhelper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attapon-th%2Fdbhelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29710308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T10:34:24.778Z","status":"ssl_error","status_checked_at":"2026-02-22T10:32:23.200Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csv","database","mysql","parquet","python","vertica"],"created_at":"2026-02-22T10:50:59.242Z","updated_at":"2026-02-22T10:50:59.966Z","avatar_url":"https://github.com/attapon-th.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database Helper\n\n### `Version: 0.7.x`\n\n[![GitHub version](https://badge.fury.io/gh/attapon-th%2Fdbhelper.svg)](https://badge.fury.io/gh/attapon-th%2Fdbhelper)\n[![GitHub release version](https://img.shields.io/github/v/release/attapon-th/dbhelper?include_prereleases)](https://github.com/attapon-th/dbhelper)\n\n\n- [Database Helper](#database-helper)\n    - [`Version: 0.7.x`](#version-07x)\n  - [Getting Started](#getting-started)\n    - [Use:](#use)\n    - [Install SQLAlchemy Database API](#install-sqlalchemy-database-api)\n  - [Process SQL file](#process-sql-file)\n    - [Usage](#usage)\n  - [Dump SQL Query to CSV file](#dump-sql-query-to-csv-file)\n    - [Usage](#usage-1)\n  - [Dump SQL Query to Parquet file](#dump-sql-query-to-parquet-file)\n\n\n\n## Getting Started\n\n```bash\npip install git+https://github.com/attapon-th/dbhelper@latest\n```\n\n### Use:\n\n```base\ndbper --help\n```\n\n### Install SQLAlchemy Database API\n\n```bash\n# mysql\n# dsn=mysql+pymysql://user:pass@host:port/dbname\npip install pymysql\n\n# postgres\n# dsn=postgresql+psycopg2://user:pass@host:port/dbname\npip install psycopg2-binary\n\n# vertica\n# dsn=vertica+vertica_python://user:pass@host:port/dbname\npip install git+https://github.com/attapon-th/sqlalchemy-vertica-python.git@latest\n\n# other sqlalchemy support\n```\n\u003e other sqlalchemy support\n\u003e [https://docs.sqlalchemy.org/en/20/core/engines.html](https://docs.sqlalchemy.org/en/20/core/engines.html)\n\n## Process SQL file\n\n### Usage \n\n```bash\nexport DB_DSN=vertica+vertica_python://user:pass@host:port/dbname\ndbper process test.sql \n\n# or \n\ndbper process --dsn \"vertica+vertica_python://user:pass@host:port/dbname\" test.sql\n```\n\nexample `test.sql`****\n```sql\n-- test.sql\n-- create table\nCREATE TABLE IF NOT EXISTS test (\n  id int,\n  name text\n);\n\n-- insert data\nINSERT INTO test (id, name) VALUES\n  (1, 'a'),\n  (2, 'b'),\n  (3, 'c');\n\n-- select data\nSELECT * FROM test;\n```\n\n\n---\n\n\n## Dump SQL Query to CSV file\n\n### Usage\n```bash\nexport DB_DSN=vertica+vertica_python://user:pass@host:port/dbname\n\ndbper csv \\\n  --output test.csv\n  \"SELECT * FROM test\"\n\n# or\ndbper csv \\\n  --dsn \"vertica+vertica_python://user:pass@host:port/dbname\" \\\n  --output test.csv\n  \"SELECT * FROM test\"\n\n```\n\n## Dump SQL Query to Parquet file\n\n```bash\nexport DB_DSN=vertica+vertica_python://user:pass@host:port/dbname\ndbper parquet \\\n  --output test.parquet \\\n  \"SELECT * FROM test\" \n\n\n# or\ndbper parquet \\\n  --dsn \"vertica+vertica_python://user:pass@host:port/dbname\" \\\n  --output test.parquet \\\n  \"SELECT * FROM test\" \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattapon-th%2Fdbhelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattapon-th%2Fdbhelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattapon-th%2Fdbhelper/lists"}