Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.
/ sqltocsv Public archive
forked from StabbyCutyou/sqltocsv

Stream large SQL result sets into a local file

License

Notifications You must be signed in to change notification settings

Tapjoy/sqltocsv

 
 

Repository files navigation

SQL To CSV

This is a utility to make use of golangs sql package and it's streaming capabilities, for exporting large result sets out of an RDBMS and into a text file.

Currently, it supports TSV and mysql. Additional support coming for setting the delimiter, as well as additional databases.

To run it, call from bash like so:

STC_DBADAPTER="mysql" STC_CONNSTRING="root@tcp(localhost:3306)/mydb" STC_QUERY="SELECT * FROM table" STC_OUTPUTFILE="data.csv" go run sqltocsv.go

TODO

Proper Readme Postgres support Variable delimiter

LICENSE

Apache v2 - See LICENSE

About

Stream large SQL result sets into a local file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 43.6%
  • Go 28.3%
  • Makefile 24.4%
  • Dockerfile 3.6%
  • Procfile 0.1%