{"id":22436988,"url":"https://github.com/entorb/sql2csv","last_synced_at":"2025-03-27T08:43:42.228Z","repository":{"id":103799824,"uuid":"361138418","full_name":"entorb/sql2csv","owner":"entorb","description":"connects to DB, reads *.sql files, runs containing select, export as .csv files","archived":false,"fork":false,"pushed_at":"2025-01-07T20:37:50.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T13:44:34.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entorb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2021-04-24T10:59:12.000Z","updated_at":"2025-01-07T20:37:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad4083c0-c133-43f7-8b12-b5a829236161","html_url":"https://github.com/entorb/sql2csv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fsql2csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fsql2csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fsql2csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entorb%2Fsql2csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entorb","download_url":"https://codeload.github.com/entorb/sql2csv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245813200,"owners_count":20676763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-06T00:10:32.698Z","updated_at":"2025-03-27T08:43:42.206Z","avatar_url":"https://github.com/entorb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sql2csv\n\n## Features\n\n* connect to a database\n* read all .sql files of current directory\n* execute one after the other\n* export results set as text (.csv) and Excel (.xslx)\n\n## Supported Databases\n\n* PostgreSQL\n* Oracle\n* MS SQL\n* SQLite3\n\n## TODOs\n\n* [x] scan SQL for dangerous commands like DROP/DELETE (incomplete!)\n* [x] Limits the max number of returned rows via limit on cells = columns * rows\n* [x] hashing of SQL files to prevent modification\n* [ ] Excel: autosize column width\n* [ ] use [sqlparse](https://sqlparse.readthedocs.io/en/latest/api/) to remove comments from SQL\n\n## **SECURITY WARNING:** Only use read-only db-user accounts\n\nexample for PostgreSQL\n\n```sql\nGRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO username\nGRANT USAGE ON SCHEMA schema_name TO username\n```\n\n## Requirements\n\n### Oracle\n\nOracle Instant Client - Basic Light Package\nfrom\n\u003chttps://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html\u003e\ndownload, unzip and add dir to path\n\n### MS SQL\n\nMicrosoft ODBC Driver for SQL Server\nfrom\n\u003chttps://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver15\u003e\ninstall\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentorb%2Fsql2csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentorb%2Fsql2csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentorb%2Fsql2csv/lists"}