【文件属性】:
文件名称:redshift_csv
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-06 14:51:38
Ruby
RedshiftCsv
一个将redshift查询输出到csv的gem。
安装
将此行添加到您的应用程序的Gemfile中:
gem 'redshift_csv'
然后执行:
$ bundle
或将其自己安装为:
$ gem install redshift_csv
用法
RedshiftCsv . config (
host : 'cluster_name.top_secret.us-east-1.redshift.amazonaws.com' ,
user : "username" ,
password : "some_password" ,
dbname : 'db_name'
)
query = "select * from some_table;"
output_path = " #{ Dir . pwd } /output.csv"
output =
【文件预览】:
redshift_csv-master
----LICENSE.txt(1KB)
----lib()
--------redshift_csv()
--------redshift_csv.rb(305B)
----Gemfile(97B)
----spec()
--------spec_helper.rb(82B)
--------redshift_csv_spec.rb(204B)
----Rakefile(117B)
----.travis.yml(76B)
----README.md(1KB)
----.rspec(31B)
----.gitignore(94B)
----redshift_csv.gemspec(1KB)
----bin()
--------console(351B)
--------setup(115B)