{"id":17267208,"url":"https://github.com/eirannejad/pushcsv","last_synced_at":"2025-08-21T02:32:24.261Z","repository":{"id":86286849,"uuid":"175907748","full_name":"eirannejad/pushcsv","owner":"eirannejad","description":"Push csv/tsv data to database","archived":false,"fork":false,"pushed_at":"2019-08-16T19:47:22.000Z","size":5435,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-01T02:21:38.112Z","etag":null,"topics":["csv","database","tsv"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eirannejad.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-16T00:24:46.000Z","updated_at":"2022-01-02T08:19:36.000Z","dependencies_parsed_at":"2023-03-12T10:46:06.137Z","dependency_job_id":null,"html_url":"https://github.com/eirannejad/pushcsv","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirannejad%2Fpushcsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirannejad%2Fpushcsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirannejad%2Fpushcsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirannejad%2Fpushcsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eirannejad","download_url":"https://codeload.github.com/eirannejad/pushcsv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230479993,"owners_count":18232645,"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":["csv","database","tsv"],"created_at":"2024-10-15T08:10:01.273Z","updated_at":"2024-12-19T18:18:49.624Z","avatar_url":"https://github.com/eirannejad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"art/logo.svg\" width=\"128\"/\u003e\n\n# pushcsv\nPush csv/tsv data to database\n\n#### Supported Backends\n\n|Database   |Driver                                 |\n|-----------|---------------------------------------|\n|postgresql |github.com/lib/pq                      |\n|mongodb    |gopkg.in/mgo.v2                        |\n|mysql      |github.com/go-sql-driver/mysql         |\n|sqlserver  |github.com/denisenkom/go-mssqldb       |\n|sqlite3    |github.com/mattn/go-sqlite3            |\n\n### Getting pushcsv\n\n```shell\ngo install github.com/eirannejad/pushcsv\n```\n\nBuild process on Windows requires `gcc` to support compiling the sqlite3 libraries. Therefore binaries are provided for convenience under [Releases](https://github.com/eirannejad/pushcsv/releases). Compiled `pushcsv` binaries can be installed on Windows using [Chocolatey](https://chocolatey.org/) package manager as well.\n\n```shell\nchoco install pushcsv\n```\n\n### Usage\n\nExamples of pushing `users.csv` into table (collection in case of mongodb) `users` on supported databases:\n\n```shell\n$ pushcsv postgres://user:pass@data.mycompany.com/mydb users ~/users.csv --headers --purge\n$ pushcsv mongodb://user:pass@localhost:27017/mydb users ~/users.csv --map=name:fullname --map=email:userid\n$ pushcsv \"mysql:user:pass@tcp(localhost:3306)/tests\" users ~/users.csv --purge --map=name:fullname --map=email:userid\n$ pushcsv sqlserver://user:pass@my-azure-db.database.windows.net?database=mydb users ~/users.csv --purge --map=name:fullname --map=email:userid\n$ pushcsv sqlite3:data.db users ~/users.csv\n```\n\n### Building from source\n\n```shell\n$ git clone git@github.com:eirannejad/pushcsv.git\n$ cd pushcsv\n$ go get -u ./...\n$ go install .\n$ pushcsv --help\n```\n\nTo reduce the size of pushcsv compiled binary, install with `-ldflags \"-w\"` option.\n\n```shell\ngo install -ldflags \"-w\" .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feirannejad%2Fpushcsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feirannejad%2Fpushcsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feirannejad%2Fpushcsv/lists"}