{"id":20087248,"url":"https://github.com/dustinkredmond/sqlitetocsv","last_synced_at":"2025-08-26T02:13:59.840Z","repository":{"id":114847981,"uuid":"322651648","full_name":"dustinkredmond/SQLiteToCSV","owner":"dustinkredmond","description":"Command line tool written in C language to export SQLite data as a CSV file.","archived":false,"fork":false,"pushed_at":"2020-12-21T17:25:26.000Z","size":2234,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T02:05:05.938Z","etag":null,"topics":["c","csv","sql","sqlite-databases"],"latest_commit_sha":null,"homepage":"","language":"C","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/dustinkredmond.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,"publiccode":null,"codemeta":null}},"created_at":"2020-12-18T16:46:14.000Z","updated_at":"2021-01-08T17:27:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"84723751-668a-4481-a255-d338478f241d","html_url":"https://github.com/dustinkredmond/SQLiteToCSV","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dustinkredmond/SQLiteToCSV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dustinkredmond%2FSQLiteToCSV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dustinkredmond%2FSQLiteToCSV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dustinkredmond%2FSQLiteToCSV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dustinkredmond%2FSQLiteToCSV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dustinkredmond","download_url":"https://codeload.github.com/dustinkredmond/SQLiteToCSV/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dustinkredmond%2FSQLiteToCSV/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272160241,"owners_count":24883779,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","csv","sql","sqlite-databases"],"created_at":"2024-11-13T16:04:43.239Z","updated_at":"2025-08-26T02:13:59.811Z","avatar_url":"https://github.com/dustinkredmond.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SQLiteToCSV\n\nProvides the means to copy SQLite query results to a CSV file with your \nchoice of delimiter. I originally wrote this program in about 30 lines of Python code, but found\nthat for extremely large SQLite databases I wasn't getting the performance that I needed. Hence this...\n\n\n---\n\n### Building\n\nEnsure that you have a `C` compiler installed (GCC preferred). Next,\ninstall the SQLite library. If using the `apt` package manager, this is\naccomplished by the following command, some Linux distros may already include this.\n\n```\nsudo apt install libsqlite3-dev\n```\n\nNext, clone the project from GitHub and change directory.\n\n```\ngit clone https://github.com/dustinkredmond/SQLiteToCSV \u0026\u0026 cd SQLiteToCSV\n```\n\nTo compile from source, run the following (requires CMake and Make)\n\n```\ncmake . \u0026\u0026 make\n```\n\nAn executable will be generated, run it as so.\n\n```\n./SQLiteToCsv\n```\n\n---\n\n### Command line options\n\n- -db - Path to SQLite database\n- -out - Path to export CSV file\n- -delimiter - Delimiter to use in CSV file (optional) defaults to comma if not provided\n- -sql - SQL query to retrieve from database\n- -prompt - Prompt the user to continue (doesn't by default)\n- -help - Print information seen here\n\n---\n\n### Usage\n\nLet's say we have a database called `Test.db` in the current working directory.\n`Test.db` has a table `EMPLOYEE`. If we wanted a subset of the records in this\ntable we could make a call to SQLiteToCSV like below.\n\n```shell\n./SQLiteToCSV -db ./Test.db -out ./Test.csv -sql \"SELECT * FROM EMPLOYEE WHERE DEPARTMENT_ID = 15\"\n```\n\nThis would in turn run the query against the SQLite database, and pop out a `Test.csv` file\nin the directory specified.\n\n---\n\n### Not supported\n\nBLOBs or other binary objects. Instead, the string '\u0026lt;BLOB format not supported\u0026gt;' will be written.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdustinkredmond%2Fsqlitetocsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdustinkredmond%2Fsqlitetocsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdustinkredmond%2Fsqlitetocsv/lists"}