{"id":13416256,"url":"https://github.com/singer-io/target-csv","last_synced_at":"2025-04-27T17:32:48.901Z","repository":{"id":18157367,"uuid":"83066637","full_name":"singer-io/target-csv","owner":"singer-io","description":"Write Singer data to CSV files","archived":false,"fork":false,"pushed_at":"2023-08-29T16:56:27.000Z","size":32,"stargazers_count":37,"open_issues_count":16,"forks_count":70,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-07-31T21:55:45.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singer-io.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":"2017-02-24T17:33:37.000Z","updated_at":"2024-07-10T23:04:44.000Z","dependencies_parsed_at":"2022-08-26T20:02:35.778Z","dependency_job_id":null,"html_url":"https://github.com/singer-io/target-csv","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftarget-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftarget-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftarget-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singer-io%2Ftarget-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singer-io","download_url":"https://codeload.github.com/singer-io/target-csv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251178106,"owners_count":21548166,"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-07-30T21:00:56.092Z","updated_at":"2025-04-27T17:32:48.532Z","avatar_url":"https://github.com/singer-io.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# target-csv\n\nA [Singer](https://singer.io) target that writes data to CSV files.\n\n## How to use it\n\n`target-csv` works together with any other [Singer Tap] to move data from sources like [Braintree], [Freshdesk] and [Hubspot] to CSV-formatted files. It is commonly used for loading data into tools like Excel or simply storing a backup of the source data set.\n\n### Install\n\nWe will use [`tap-exchangeratesapi`][Exchangeratesapi] to pull currency exchange rate data from a public data set as an example.\n\nFirst, make sure Python 3 is installed on your system or follow these installation instructions for [Mac] or [Ubuntu].\n\nIt is recommended to install each Tap and Target in a separate Python virtual environment to avoid conflicting dependencies between any Taps and Targets.\n\n```bash\n # Install tap-exchangeratesapi in its own virtualenv\npython3 -m venv ~/.virtualenvs/tap-exchangeratesapi\nsource ~/.virtualenvs/tap-exchangeratesapi/bin/activate\npip install tap-exchangeratesapi\ndeactivate\n\n# Install target-csv in its own virtualenv\npython3 -m venv ~/.virtualenvs/target-csv\nsource ~/.virtualenvs/target-csv/bin/activate\npip install target-csv\ndeactivate\n```\n\n### Run\n\nWe can now run `tap-exchangeratesapi` and pipe the output to `target-csv`.\n\n```bash\n~/.virtualenvs/tap-exchangeratesapi/bin/tap-exchangeratesapi | ~/.virtualenvs/target-csv/bin/target-csv\n```\n\nThe data will be written to a file called `exchange_rate-{timestamp}.csv` in your working directory.\n\n```bash\n› cat exchange_rate-{timestamp}.csv\nAUD,BGN,BRL,CAD,CHF,CNY,CZK,DKK,GBP,HKD,HRK,HUF,IDR,ILS,INR,JPY,KRW,MXN,MYR,NOK,NZD,PHP,PLN,RON,RUB,SEK,SGD,THB,TRY,ZAR,EUR,USD,date\n1.3023,1.8435,3.0889,1.3109,1.0038,6.869,25.47,7.0076,0.79652,7.7614,7.0011,290.88,13317.0,3.6988,66.608,112.21,1129.4,19.694,4.4405,8.3292,1.3867,50.198,4.0632,4.2577,58.105,8.9724,1.4037,34.882,3.581,12.915,0.9426,1.0,2017-02-24T00:00:00Z\n```\n\n### Optional Configuration\n\n`target-csv` takes an optional configuration file that can be used to set formatting parameters like the delimiter - see [config.sample.json](config.sample.json) for examples. To run `target-csv` with the configuration file, use this command:\n\n```bash\n~/.virtualenvs/tap-exchangeratesapi/bin/tap-exchangeratesapi | ~/.virtualenvs/target-csv/bin/target-csv -c my-config.json\n```\n\n---\n\nCopyright \u0026copy; 2017 Stitch\n\n[Singer Tap]: https://singer.io\n[Braintree]: https://github.com/singer-io/tap-braintree\n[Freshdesk]: https://github.com/singer-io/tap-freshdesk\n[Hubspot]: https://github.com/singer-io/tap-hubspot\n[Exchangeratesapi]: https://github.com/singer-io/tap-exchangeratesapi\n[Mac]: http://docs.python-guide.org/en/latest/starting/install3/osx/\n[Ubuntu]: https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-ubuntu-16-04","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinger-io%2Ftarget-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinger-io%2Ftarget-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinger-io%2Ftarget-csv/lists"}