ActiveWarehouse/ETL - BI & DW for Ruby/Rails

  • Published on

  • View

  • Download

Embed Size (px)


Presentation delivered at the Singapore Ruby Brigade meetup 6-Jan-2010 (at Discusses BI and DW in the Rails context, and test drives ActiveWarehouse and ActiveWarehouse/ETL with a "Cupcakes Inc" sample application.


<ul><li>1.NB: This presentation was delivered at the Singapore Ruby Brigade meetup 6-Jan-2010 (at</li></ul> <p>2. BI &amp; DW for Ruby/Rails !??? 3. Why should we care about this enterprisey stuff? </p> <ul><li>Have you heard a client ask for.. </li></ul> <ul><li><ul><li>A dashboard? </li></ul></li></ul> <ul><li><ul><li>Management reports? </li></ul></li></ul> <ul><li><ul><li>Operational statistics? </li></ul></li></ul> <ul><li> addition to the actual site? </li></ul> <p>4. Or maybe you want to pitch for the dashboard/BI projects themselves? ..using your rails skills of course BI Business Intelligence CPM Corporate Performance Mgmt BPM Business Performance Mgmt B&amp;P Budgeting and Planning EPM Enterprise Performance Mgmt Dashboard Enterprise Dashboards 5. BI Basics No, BI is not (always) an oxymoron 6. BI = Business Feedback &amp; Control Systems Keeping the doors open Uptime on the servers; alerts Infrastructure &amp; Systems 7. BI = Business Feedback &amp; Control Systems Keeping the doors open Optimising in the short term intra-day Focus on systems in isolation Need extra call centre staff on shift? Daily sales numbers? Infrastructure &amp; Systems Operational Management 8. BI = Business Feedback &amp; Control Systems Keeping the doors open Optimising in the short term intra-day Focus on systems in isolation Strategic performance monthly, quarterly, yearly Across all systems Profitability by product Utilisation and sales performance Infrastructure &amp; Systems Operational Management Executive Management 9. Traditional Rails perspective.. e.g. NewRelic Custom AR reports Someone elses problem (opportunity) Infrastructure &amp; Systems Operational Management Executive Management 10. Someone Elses Problem.. Your Rails Storefront App Fulfillment (maybe a third party) To report on sales fulfillment.. AR/AP/GL To report on revenue and profitability.. To report on sales revenue, actuals and forecast.. And dont forget all those other systems.. CRM MRP FA 11. Who is Someone Else? The gigaohm network: 5 Free Business Intelligence Crunchers for Your 2010 Arsenal 12. 13. ETL ODS Your Rails App Other Transactional Systems Data Sources DBoR, relational reporting BI &amp; DW A copy of transaction data specifically structured for query and analysis Extract Transform Load Or, Extract Load Transform Or, Transform Extract Load (depending on the technology) 14. cubes Sales = $22 Customer ID Product ID Date ID Customer dimension Date dimension Product dimension Fact categorisation Fact 15. MOLAP, ROLAP, HOLAP MOLAP: proprietary format to optimize for analytical queriesROLAP: use relational database to mimic multi-dimensionality HOLAP: hybrid. Drive analytics from MOLAP, drill down to relational Star schema Snowflake 16. Why?? Whats wrong with.. select, sum (b.amount) from products a join order_items b on = b.product_id group by product_id Product.sum (:amount, :include =&gt; :orders, :group =&gt; product_id) </p> <ul><li>Every question needs its own query </li></ul> <ul><li>Cant predict all the questions in advance </li></ul> <ul><li>Un-scalable grunt work </li></ul> <p>17. ActiveWarehouseActiveWarehouse-ETL 18. ActiveWarehouse </p> <ul><li>Rails plugin by Anthony Eden </li></ul> <ul><li>ROLAP solution based on ActiveRecord </li></ul> <ul><li>Features </li></ul> <ul><li><ul><li>Generators for Facts, Dimensions, Cubes and Bridges </li></ul></li></ul> <ul><li><ul><li>Supports calculated fields </li></ul></li></ul> <ul><li><ul><li>View helpers for reports with drill down </li></ul></li></ul> <p>19. ActiveWarehouse-ETL </p> <ul><li>Rails gem/plugin by Anthony Eden </li></ul> <ul><li>DSL for extract transform load </li></ul> <ul><li>Source/sink: file, db, xml, .. (extensible) </li></ul> <ul><li>Features </li></ul> <ul><li><ul><li>Pre/post processors </li></ul></li></ul> <ul><li><ul><li>Transformations </li></ul></li></ul> <p>20. 21. The Cupcakes Store Use Activewarehouse-etl to load seed data from csv to app db (mysql) 1 The Cupcakes BI Dashboard 2 Use Activewarehouse-etl to load dimension and fact data to the warehouse (mysql to mysql) 3 Use Activewarehouse to build a simple analytical dashboard and reporting tool Follow the documentation at see how this works (and try it yourself) 22. Product listing at Cupcakes Inc.. 23. Customer listing at Cupcakes Inc.. 24. Order listing at Cupcakes Inc.. 25. Order detail at Cupcakes Inc.. 26. Sales By Product AW Report 27. Sales By Product (drill to 2009) 28. Reasons to be Cheerful.. 29. Language ETL processing, cube rules etc typically use custom languages (often archaic and limited) BI Suites Its ruby! 30. UI Customisation and Presentation Integration Web delivery typically very constrained. Often rely on strong integration with office software (Excel). Leads to custom application development in Excel syndrome. BI Suites Its ActionPack! Google maps mashups, social graph links. .. you get full UI control, as long as you have the development budget. 31. Speed of development Basic deployments can be very fast. But UI inflexibility can lead to either lots of time wasted trying to shoe-horn, or need to reset customer expectations BI Suites Its Ruby &amp; Rails. Say no more ;-) 32. TCO Top-tier suites can come with a hefty $ tag. And prices are going up.. But some analysts are predicting 2010 to be the year BI gets FLOSS momentum (see gigaohm review of 5 well established alternatives) BI Suites Its Ruby &amp; Rails. Say no more ;-) Trade-in software license costs for more development. 33. Caveats.. 34. Native MOLAP Generally good support for database MOLAP features. Can be platform specific though e.g. Microsoft MDX, SQL Server Analytical Services BI Suites A gap. No real support currently available.ActiveWarehouse uses relational model to fake MOLAP (ROLAP) 35. Performance Generally, all established analytical engines (and backing databases) have great performance track record. Huge scalability (millions of rows)BI Suites Unproven. ActiveWarehouse/ETL does not have many (public) proof points.Given that it is tied to AR performance, expect scalability could be an issue. 36. Take-aways ~ActiveWarehouse </p> <ul><li>Its an impressive codebase. When you get it working, it works well.. but </li></ul> <ul><li><ul><li>Virtually no documentation! </li></ul></li></ul> <ul><li><ul><li>No contemporary examples </li></ul></li></ul> <ul><li><ul><li>Not under very active development </li></ul></li></ul> <ul><li><ul><li>A textbook data warehouse implementation. May or may not be exactly what you want.. </li></ul></li></ul> <ul><li>Remember:</li></ul> <ul><li><ul><li>data is batched. Not realtime. </li></ul></li></ul> <ul><li><ul><li>Rails 2.x : install the plugin (gem is 1.x) </li></ul></li></ul> <p>3 37. Take-aways ~ ActiveWarehouse-ETL </p> <ul><li>Neat tool. In addition to feeding AW: </li></ul> <ul><li><ul><li>Generate and load seed/test data </li></ul></li></ul> <ul><li><ul><li>Move data between systems </li></ul></li></ul> <ul><li>But again, </li></ul> <ul><li><ul><li>Poor documentation </li></ul></li></ul> <ul><li><ul><li>When it fails, can do so silently (makes sure filename paths are delimited correctly for your platform!) </li></ul></li></ul> <p>2 38. Take-aways ~ BI on Rails Solutions </p> <ul><li>Plain AR </li></ul> <ul><li><ul><li>just avoid the rabbit hole </li></ul></li></ul> <ul><li>AR + ETL </li></ul> <ul><li><ul><li>get all the data you need in one place </li></ul></li></ul> <ul><li>AW+ETL </li></ul> <ul><li><ul><li>traditional ROLAP, make Rails the focus of the BI effort </li></ul></li></ul> <ul><li>Go the BI suite route </li></ul> <ul><li><ul><li>When you need to adapt to many transactional systems at scale, and customer has the $$</li></ul></li></ul> <ul><li><ul><li>(Rails remains just for transactional apps) </li></ul></li></ul> <ul><li>Or (discussion point;-) </li></ul> <p>1 39. Thank you! </p> <ul><li>Questions? </li></ul> <p>0 40. Some References </p> <ul><li>ActiveWarehouse: </li></ul> <ul><li>ActiveWarehouse-ETL: </li></ul> <ul><li>Cupcakes Inc sample site(s): </li></ul> <ul><li>Singapore Ruby Brigade (SRB): </li></ul>


View more >