Sha256: 25856460cf8187c9c7c0877ac8ed78e2b433f6bd7e8dbdfcb3ebdadffdb853c3
Contents?: true
Size: 664 Bytes
Versions: 4
Compression:
Stored size: 664 Bytes
Contents
# SqlCsv Create a CSV export from a SQL query. ## Installation Add this line to your application's Gemfile: ```ruby gem 'sql_csv' ``` And then execute: $ bundle install Or install it yourself as: $ gem install sql_csv ## Usage An executable `sql2csv` is installed with the gem. Write an SQL command to `stdin` and set `DATABASE_URL` to configure connection. CSV output will be written to `stdout`. ```bash echo "select * from users" | DATABASE_URL='postgresql://user:password@host:1234/database' sql2csv > users.csv ``` ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sql_csv-0.2.3 | README.md |
sql_csv-0.2.2 | README.md |
sql_csv-0.2.1 | README.md |
sql_csv-0.2.0 | README.md |