GithubHelp home page GithubHelp logo

activewarehouse / activewarehouse Goto Github PK

View Code? Open in Web Editor NEW
197.0 197.0 38.0 1.38 MB

ActiveWarehouse for Rails - Implement data warehouses with Rails

Home Page: http://activewarehouse.rubyforge.org/

License: MIT License

Ruby 100.00%

activewarehouse's Introduction

ActiveWarehouse

The ActiveWarehouse library provides classes and functions which help with building Data Warehouses using Rails.

Installation

To install ActiveWarehouse, add the gem to your Gemfile:

gem 'activewarehouse'

Generators

ActiveWarehouse comes with several generators. In the examples below, you can use either example and the results will be the same.

Facts

Creates a SalesFact class and a sales_facts table.

script/generate fact Sales
script/generate fact sales

Dimensions

Creates a RegionDimension class and a region_dimension table.

script/generate dimension Region
script/generate dimension region

Cubes

Creates a RegionalSalesCube class.

script/generate cube RegionalSales
script/generate cube regional_sales

Bridge

Creates a CustomerHierarchyBridge class.

script/generate bridge CustomerHierarchy
script/generate bridge customer_hierarchy

Dimension View

Creates an OrderDateDimension class which is represented by a view on top of the DateDimension.

script/generate dimension_view OrderDate Date
script/generate dimension_view order_date date

Model Naming

The rules for naming are as follows:

Facts:

  • Fact classes and tables follow the typical Rails rules: classes are singular and tables are pluralized.
  • Both the class and table name are suffixed by "_fact".

Dimensions:

  • Dimension classes and tables are both singular.
  • Both the class name and the table name are suffixed by "_dimension".

Cube:

  • Cube class is singular. If a cube table is created it will also be singular.

Bridge:

  • Bridge classes and tables are both singular.
  • Both the class name and the table name are suffixed by "_bridge".

Dimension View:

  • Dimension View classes are singular. The underlying data structure is a view
  • on top of an existing dimension.
  • Both the class name and the view name are suffixed by "_dimension"

ETL

The ActiveWarehouse plugin does not directly handle Extract-Transform-Load processes, however the ActiveWarehouse ETL gem (installed separately) can help. To install it use:

gem install activewarehouse-etl

More information on the ETL process can be found at http://activewarehouse.rubyforge.org/etl

activewarehouse's People

Contributors

aeden avatar cqr avatar jackhong avatar kookster avatar mainej avatar mghaught avatar stellard avatar thbar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activewarehouse's Issues

TableReport.new - ArgumentError: wrong number of arguments(1 for 0)

Hi Thibaut,

I just updated activewarehouse gem (was using some old version (commit 0b4a8ef).
And when I tried to run our table reports I got this error:
ArgumentError: wrong number of arguments(1 for 0)

For me it's easy to reproduce this in console also:
Loading development environment (Rails 3.2.6)
1.9.3p125 :001 > @report = ActiveWarehouse::Report::TableReport.new
ArgumentError: wrong number of arguments(1 for 0)
from /Users/sgrgic/.rvm/gems/ruby-1.9.3-p125@DWR32/bundler/gems/activewarehouse-be1b19c0d70d/lib/active_warehouse/report/abstract_report.rb:50:in initialize' from /Users/sgrgic/.rvm/gems/ruby-1.9.3-p125@DWR32/bundler/gems/activewarehouse-be1b19c0d70d/lib/active_warehouse/report/abstract_report.rb:50:ininitialize'
from (irb):1:in new' from (irb):1 from /Users/sgrgic/.rvm/gems/ruby-1.9.3-p125@DWR32/gems/railties-3.2.6/lib/rails/commands/console.rb:47:instart'
from /Users/sgrgic/.rvm/gems/ruby-1.9.3-p125@DWR32/gems/railties-3.2.6/lib/rails/commands/console.rb:8:in start' from /Users/sgrgic/.rvm/gems/ruby-1.9.3-p125@DWR32/gems/railties-3.2.6/lib/rails/commands.rb:41:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

Seems that this is related to method initialize in lib/active_warehouse/report/abstract_report.rb.
When I comment this method everything is ok. How is it possible that tests are passing, is this related to some other
gem or settings? I can send my environment if you need it.

Thanks,
Sinisa.

Rails 4 - Formal argument cannot be a constant (SyntaxError)

I am using ruby on rails 4 . when i tried to run gemsonrails it shows the following error

/home/victor/.rvm/gems/ruby-2.1.0/bin/gemsonrails:23:in load': /home/victor/.rvm/gems/ruby-2.1.0/gems/gemsonrails-0.7.2/bin/gemsonrails:26: formal argument cannot be a constant (SyntaxError) "Default: .") { |OPTIONS[:rails_root]| } ^ /home/victor/.rvm/gems/ruby-2.1.0/gems/gemsonrails-0.7.2/bin/gemsonrails:26: syntax error, unexpected '[', expecting '|' "Default: .") { |OPTIONS[:rails_root]| } ^ from /home/victor/.rvm/gems/ruby-2.1.0/bin/gemsonrails:23:in

'
from /home/victor/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in eval' from /home/victor/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.