0.0
No commit activity in last 3 years
No release in over 3 years
Creates objects, converts them to Redis commands and executes the redis commands.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

RedisImporter

Takes csv files stored on Amazon S3, converts them to objects and then imports those objects into redis, serialized as redis hashes. This gem is the glue between several other gems:

  • csv_to_object (handles the conversion of a csv file to objects)
  • redis_backed_model (Gives an object a to_redis command that serializes an object as a series of redis commands)
  • redis_pipeline (Imports large sets of commands into a redis instance)

If you have those other gems set up correctly, then RedisImporter is straightforward. Tell it where your csv files are stored and you're good to go.

Installation

Add this line to your application's Gemfile:

gem 'redis_importer'

And then execute:

$ bundle

Or install it yourself as:

$ gem install redis_importer

Configuration

rails g redis_importer:install
  1. Edit config/redis_importer.yml to set your remote file-storage method and what directory should store local copies of the files during import.
  2. Edit config/s3_collection.yml to set your access key, secret access key, bucket name, etc.

At this time only Amazon S3 is supported as a remote file-storage method.

Usage

  @ri = RedisImporter::RedisImporter.new
  @ri.import => true

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request