Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Installation FAQs

Q1. How can I do a dev set-up for bahmni-mart?

A: After cloning follow the below steps:-

  • Update /src/main/resources/application-dev.properties and /bahmni-mart/src/test/resources/application-test.properties with ur corresponding vagrant ip and password(if required) 

  • Connect to the database of your local vagrant with the IDEA u are working in

  • Run /scripts/dev/testMysql.sql and  sudo mysql -pP@ssw0rd123 -e "GRANT ALL ON test_openmrs.* to'test_user'@'localhost';FLUSH PRIVILEGES;" in mysql database 

  • Run /scripts/dev/psqlTestSetup.sql and psql -U test_user test_analytics -c "CREATE SCHEMA bahmni_mart_scdf; in postgres database

Q2. How can I install mart in my local system and point to bahmni installed in Vagrant or any other environment?

A: May be the steps for gradle build and run commands we can provide. And also provide how to do the bahmni configuration.


Q3. How can I install mart without metabase using the ansible playbook?


Q4. Which version of Postgres is required for Mart as a Prerequisite?

A: For Bahmni version >=0.89 & < 0.92 -> Install PostgreSQL 92 (update the link)

For Bahmni version >= 0.92 -> Install PostgreSQL 96 (update the link)


Q5. How can I override the default mart configuration for any particular implementation?

A: You can place an overridden version of bahmni-mart.json at `/var/www/bahmni_config/bahmni-mart/` path of your implementation environment.


 Q6. How can i get started with mart?

A: Bahmni Mart Installation Setup

 Q7. What is the suggested DB tool to view the analytics table and the procedure to Connect mart to the DB tool? 

A: Bahmni-Mart Setup with MySQLWorkbench & DBeaver

 Q8.How to configure the mart jobs?

A: Bahmni-Mart Json File

 Q9: Where is mart.json file located on the server?

A: ./var/www/bahmni_config/bahmni_mart/mart.json

General FAQs

Q1. How to resolve Cannot connect to mysql or cannot connect to postgres or Communication link failure 

A: Restart mysql and postgres servers and make sure you are connecting with correct password

Q2: How to ignore columns in mart tables

A: While creating mart tables you don’t want some fields from the openmrs table. You can add them to the "columnsToIgnore" field.

Q3: One of the jobs fails(Eg: Microbiology) with out of memory issue, what should I do?

A: Bahmni mart reads job data from Bahmni and keeps it in memory until it pushes to analytics database. If the data in Bahmni is very large for that specific job memory overflow issues may occur. As of now bahmni-mart doesn’t have streaming support for all the jobs except orders. Please request for the feature enhancement.

Q4: Can I remove any jobs in bahmni-mart.json if I don’t need it?

A: Yes, it is safe to delete(or add) any unwanted job configurations from bahmni-mart.json


Q5. What is Bahmni Mart? 

A: We need 1-2 line overview of Mart.

Q6. What is Metabase?

A: We need 1-2 line overview of Metabase.


Q7. What to check if any view is failing while running mart?

A: Make sure if you have corresponding configuration in mart. For example if you don't       have registration second page configured for your implementation the corresponding view would be failing 


Q8. What are the databases supported by Mart? 


Q9: When to use Custom Sql & when to use sql files

A: When you think more than one job can use the common sql queries, you can create a separate sql file and mention the type field.

Else you can mention customSql in the type field and write the sql to be executed in readerSql field’.

  • How to view the log files.

  • How to stop the running mart.

  • What will happen if one of my jobs fails?

Q10: Why the incremental load is not working. Its always doing the full load.

A: Incremental load depends on the atom feed events that are published by openmrs. And we have the option to turn it on or off based on the usage. And we have a scheduler to publish the events from time to time. It can be configured through openmrs admin “Manage scheduler” page. Below is the property for the same

“OpenMRS event publisher task” If incremental load is not working fine, please check the above scheduler is running fine/not. 

TechnicalFAQs

Q1: How Does the data type of the values change in Bahmni mart compare to openers?


Q2: How boolean is getting stored at bahmni-mart tables?


Q3: What is the difference between form1 and form2 in mart?

A: Form 1 tables and Form 2 tables both will have the entries for the observations filled. 

But Form 1 tables will have the “id_formName” column which will contain “obs id”(openmrs) of the form concept. 

Form 2 tables will have the “form_field_path” column which will contain the form name.

Q3: What is form_field_path and reference_form_field_path?

A: These both columns will come into picture when a separate table got created for either add-more/multi-select concepts and sections.

“form_field_path” will contain the form name along with the control id followed by count of the control among all the controls that got added using add more(i.e. Path from section to the obs).

Eg:  form-name.{section_id} -{add_more_count_of_section}/{obs_control_id} - {add_more_count_of_obs}

“reference_form_field_path” will contain the path of section in the form(i.e. path from form name to the section control).

Eg:  form-name.{section_id} - {add_more_count_of_section}

Q4: Why does my customSQL job fail with SQL syntax error even though the SQL is correct? 

A: The issue could be with columnsToIgnore configuration. Mart internally parses the given SQL query in customSQL jobs using jsqlparser and removes the columns provided in columnsToIgnore. If the select part of the query is too complex(with aggregate functions etc),  jsqlparser may not be too intelligent to parse the SQL query. You can solve the problem by avoiding complex select parts in the outermost select clause or update the SQL query to remove unwanted columns so columnsToIgnore configuration can be ignored

Q5: How to fix, mart fails with FileNotFoundException ?

java.io.FileNotFoundException: /var/www/bahmni_config/bahmni-mart/bahmni-mart.json

A: Make sure the bahmni-mart.json file is there in the /var/www/bahmni_config folder. Otherwise run below task to create a symlink from /etc/bahmni-mart/conf path

ln -s  /etc/bahmni-mart/conf bahmni-mart. 

Usually when we update the config the symlink gets removed.

Q6: Why mart is failing with java.sql.SQLException and not able to connect to the databases?

 A:  Please check the passwords for both openmrs and analytics databases in /etc/bahmni-mart-playbook/setup.yml file. If it needs a change please update in setup.yml and re-run the mart installation.

Functional FAQs

Q1. Does Bahmni-mart considering older data  or data from any specific date

A: Yes, and marker table can be updated for using data from a specific date


Q2: How to remove incremental update config(or any modifications) for any grouped jobs?

A: If you maintain your own mart code then you can go to the corresponding grouped job config and make modifications there.All grouped job config jsons will be placed under /src/main/resources/groupedJobs

                                                  (or)

 If you don't have control over mart code copy the json contents from the corresponding grouped job json to your  /var/www/bahmni_config/bahmni-mart/bahmni-mart.json and make the required modifications


Q2: What is the use of giving separate table config?

A: You can add configuration to create new tables for all multi-select and add more concepts by enabling  enableForAddMoreAndMultiSelect   to true


Q3: What if we want to create a separate table for a concept which is neither multi-select nor add more?

A: You can configure the concept to have separate table created by giving concept in "separateTables": []


Q4. Is there a case where we should run mart in only full load instead of incremental load?

A: If you make any changes in bahmni-mart.json, run the mart in full load once and proceed. 

Q5: I don’t see the data in mart analytics database though mart runs successfully

A: Mart does incremental loading using the events in Bahmni/openmrs by default. If there is any delay in raising the event or if the event skipped with unknown reasons by mart, you don’t see the data. It is recommended to do a full-load of mart once in a while. You can do full load safely by truncating markers table and deleting all the tables in the analytics database.


Q6: There are some tables in mart which are not related to Bahmni anymore

A: If you do any metadata changes(Eg: changing form name) in Bahmni, the mart is not so intelligent to clear the stale tables. It is recommended to do full-load when there is a change in Bahmni metadata or any configuration is updated in bahmni-mart.json


Q7. How can I override the default mart configuration for any particular implementation?

A: You can place an overridden version of bahmni-mart.json at

/var/www/bahmni_config/bahmni-mart/path of your implementation environment.

Q8.What is the difference between Full load and Incremental Load for Mart?

Q9.What data do i get after the full Load?


Q9: What are the different cases in which I can’t see the form in mart table?

A: Following cases are possible:

  • When you form has duplicate concepts, the table creation for the form will be skipped

  • When the concept is more than 50 characters, postures will skip creating the table

Q10: How are the special characters handled in the analytics table?

A: Special characters are replaced with underscores (_)

Q11: Diff between full load and incremental load and how to switch between them. And what’s the best option?

A:


Security FAQs

Q1.How to protect the patient sensitive data from flowing to analytics table?

A: You can add the specific concepts to columns to ignore. Those concepts and the data related to the concepts will not be displayed


Q2. Where can we configure the password for Postgres?

A: You can configure password in the playbook.

/etc/bahmni-mart-playbook

Performance FAQs

Q1: Does custom query impact on performance?


Q2.How long will it take to run mart?

A: It depends majorly on the following 2 factors:

  • It depends on the number of jobs configured

  • Data present in the openmrs tables.


Q3.What is the suggested way to run the bahmni-mart. (Incremental, Full Load)


Name of the contributers :

  • No labels