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
- Host: GitHub
- URL: https://github.com/delonnewman/relational
- Owner: delonnewman
- Created: 2019-05-08T17:44:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T03:58:07.000Z (over 6 years ago)
- Last Synced: 2025-06-13T09:45:00.829Z (12 months ago)
- Topics: csv, csv-import, data, data-analysis, database, export, json, relational, relational-algebra, relational-database, relational-model, relational-programming, reporting, reports, ruby, yaml
- Language: Ruby
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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')
```