Microsoft Access
From RapidWiki
Microsoft Access is a database management system invented and distributed by the Microsoft corporation. Microsoft Access databases can be loaded into RapidMiner setting up ODBC drivers for the databases and subsequently accessing the databases via ODBC.
Contents |
Accessing a Microsoft Access database from RapidMiner
Loading data from a Microsoft Access database into RapidMiner (or storing data into a Microsoft Access database from RapidMiner) consists of two steps. The first one is to set up an ODBC driver for a particular Access database. The second step is to load the data into RapidMiner via the DatabaseExampleSource operator or store the data from RapidMiner into the database using the DatabaseExampleSetWriter operator.
ODBC driver setup
Setting up an ODBC driver for an Microsoft Access database involves the following steps:
- Open Start -> Control Panel -> Administrative Tools -> Data Sources (ODBC).
- Choose whether you want to add ODBC connectivity for only the current user or system-wide by selecting the corresponding tab, i.e. choose either User DSN or System DSN, respectively.
- Click on the Add... button.
- Select Microsoft Access Driver (*.mdb) and click on the Finish button.
- Now select the newly added driver and press Configure.
- As Data Source Name enter (and and keep in mind) a name for that ODBC database.
- Click on Database -> Select... and choose the Access database you want to use.
- Click on Advanced... and enter a Login name and Password for the Default Authorization. Remember these authentication details as well.
- Then click on OK, then on OK, and once again on OK.
Once you have successfully executed these steps, the first part of loading from or storing into an Access database is complished. The final part of loading the data into RapidMiner involves the DatabaseExampleSource operator which is able to access the ODBC driver you recently set up. If data is to be written, the DatabaseExampleSetWriter which also makes use of the ODBC driver is the appropriate choice.
Load and store data via ODBC
To load data from an Access database via the DatabaseExampleSource the following properties, i.e. parameter values, have to be set:
- Set the parameter database_url as jdbc:odbc:<database_name> where <database_name> matches the ODBC database name you previously specified.
- Set parameters user and password using the authentication details you also previously specified.
- Either specify a table name in your database by setting the parameter table_name or specify a select statement selecting the data you want to load into RapidMiner (e.g. SELECT * FROM <table_name>) in the parameter query.
