Creating Data Sources in MINT

From IMSMA Wiki
Revision as of 09:40, 7 October 2014 by Evinek (talk | contribs)
Jump to navigation Jump to search
This page is under construction

A connection to a database (for example to the IMSMA Staging Area) is called a Data Source. The first step for getting started with MINT or lightMINT is to create a data source. The tool needs to know where the data that has to be analysed is stored. A data source can be:

  • an IMSMA staging area database
  • any other database
  • an XML or Excel file -- the preferred way however is to import or dump the content of a file in a database and then connect MINT to the database. This solution simply scales better and is better manageable. Please get in touch with your GICHD IM focal point prior to including file-based data into MINT.

Types of data sources

There are different types of data sources. The most common ones to be defined in MINT/lightMINT are the following:

  • JDBC data source: Java Database Connectivity (JDBC) is a Java-based data access technology. It allows access to relational databases, such as Postgres, MySQL, etc. For each database technology, a specific driver is needed. In both MINT and lightMINT, drivers for Postgres and MySQL are included, others might need to be installed on request.
  • JNDI data source: Java Naming and Directory Interface (JNDI) is also a Java-based technology to connect to and query data. It is defined directly on the (MINT/lightMINT) server, centrally and only once. The advantages over a JDBC connection are in maintainability and performance - JNDI manages pools of connections instead of opening many separate connections on the database if several processes are accessing the data simultaneously.
  • Virtual data source: this type of data source allows combining multiple JDBC and JNDI data sources in order to make them available through a domain. This is very useful if several databases/data sources, e.g. IMSMA and an additional source, need to be analyzed together. In such a case, it is crucial though to identify a common key that allows joining the data sets.

Create a data source

Only administrators can create data sources.

There are two easy ways of creating a data source:

  1. In MINT, in the top menu, click on Create → Data Source
  2. In MINT and lightMINT: right-click on the folder in which the data source should be stored, and choose Add Resource → Data Source

In both cases, the following page to enter the data source properties appears.

It is recommended to save all data sources in one folder, e.g. named Data Sources, in the MINT repository.

Define a JDBC data source

Define a JNDI data source

Virtual data source

{{#switch:|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:|child||{{#ifeq:|subgroup||{{#switch:creating data sources in mint

|doc
|sandbox
|testcases =
|#default = {{#switch:hlist
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}