Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
2014 Internship Project
This project is being considered as a potential project for 2014 Internships. If you are a potential intern and are interested in working on this project, please discuss it in detail with the mentor(s) listed here before submitting your internship proposal.
Peform ETL in web app from MySQL to Hive and perform predictive analysis over it.
A. First Stage Process -
I. ETL can performed in following ways -
Which is performed over: OpenMRS Database to Enterprise Data-warehouse (EDW)
II. Open Source Tools for ETL - Petaho, Talend, CloverETL, JasperSoft etc.
Where Pentaho and Talend are in my first preferences because Pentaho is faster and easier to use because of its GUI while Talend is more a tool for people who are making already a Java program and want to save lots and lots of time with a tool that generates code for them.
III. Three way to integrate it in OpenMRS -
1. Integration in the Web Application (Dynamic)
We can perform ETL in OpenMRS web application at some regular interval of time. Where a jQuery library is required which is integrated in JSP pages.
2. Integration in the Server i.e. OpenMRS Standalone (Static)
When any one start the server he/she runs the OpenMRS Standalone. We can perform ETL in standalone at some regular interval of time. Where we have some menu items in Standalone like :
ETL Tool Menu-
Force Update - Escaping whatever the scheduled time and performs ETL
Set Interval - Set interval of time after which a ETL is performed.
3. OpenMRS ETL Tool-kit
This is separate application that doesn't require the running of server. It will have the same functionality as first way integration with some extending capability. The benefit of this method is we can also use other cross platform implementation other than java like in C# for performing ETL. This gives the independency of language selection.
IV. Selection of EDW - Using Apache Hive. Apache Hive is probably the best way to store data in Hadoop as it uses a table concept and have a SQL like language, HiveQL
ETL via the Apache Hive is implemented by connecting to the MySQL OpenMRS database and reading tables information, and writing them into a file in HDFS.
Figure 1: MySQL to HDFS Integration
This integration uses a JS Library where user drag and drop objects somehow similar to what one can do in informatica and then generate a sql which will be executed at backend.
It connects to the MySQL OpenMRS database to read the table information and then:
Databases are mapped as separate directories, with their tables mapped as sub-directories with a Hive data warehouse directory. Data inserted into each table is written into text files (named as datafile1.txt) in Hive / HDFS. Data can be in comma separated format; or any other, that is configurable by command line arguments.
Figure 2: Mapping between MySQL and HDFS Schema
Exporting Tables From MySQL To Hive
Manual via CSV
Possible with DDL changes
Requires DDL changes
Full table scan
Full and partial table scans
Low-impact binlog scan
First we try to perform a sample ETL from a MySQL DB to another MySQL DB and Export it to Hive.
I. After a ETL is performed, now for Second Stage we require two component
2. OpenMRS Predictive Analysis Module.
II. Performing Predictive Analysis - we can use Apache Mayhout for implementation.
This project seems interesting to me. I have started reading the above resources. Want to discuss more. How to contact you ?
Feel free to drop me an email at gaurav[AT]gauravpaliwalDOTcom.
Objectives are not included in this. Can you guide me on this. I would like to work on this project.