Skip to content
This repository was archived by the owner on Dec 26, 2024. It is now read-only.

Tapjoy/sqltocsv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

 
 
 

Contributors

Languages

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