An open API service indexing awesome lists of open source software.

https://github.com/delonnewman/relational

Relational programming for Ruby
https://github.com/delonnewman/relational

csv csv-import data data-analysis database export json relational relational-algebra relational-database relational-model relational-programming reporting reports ruby yaml

Last synced: about 1 month ago
JSON representation

Relational programming for Ruby

Awesome Lists containing this project

README

          

Relational
==========

Relational programming for Ruby

Synopsis
========

```ruby
relational do
people = from('path/to/people.csv', schema: {created_at: :datetime, name: :string}).where(->(row) { person.created_at > Date.today - 1 })
users = from('path/to/usernames.json').select(:id, :name)
people.join(users).select(:id, :name, :created_at).rename(:id, :user_id).to('path/to/report.csv')
end
```

or

```ruby
Relational.from('path/to/people.csv')
.join(Relational.from('path/to/usernames.json'))
.select(:id, :name, :created_at)
.rename(:id, :user_id)
.to('path/to/data-export.json')
```