...
In this tutorial we will use a data service that exposes RDBMS data.
Upload the (already created) data service
You can download the RDBMSDataService from here. If required, you can create the same data service from scratch following the tutorial on exposing an RDBMS as a data service.
Note |
---|
By default, this data service exposes data in XML format. You can follow the steps in this tutorial to change the output type to JSON. |
Create the RDBMS data store
If you haven't already completed the tutorial on exposing an RDBMS as a data service, follow the steps given below to set up the MySQL database for this tutorial.
- Install the MySQL server.
Download the JDBC driver for MySQL from here and copy it to your
<EI_HOME>/lib
directory.Note If the driver class does not exist in the relevant folders when you create the datasource, you will get an exception such as 'Cannot load JDBC driver class com.mysql.jdbc.Driver'.- Create the following database:
Employees
Create the Employee table inside the Employees database:
Code Block CREATE TABLE Employees (EmployeeNumber int(11) NOT NULL, FirstName varchar(255) NOT NULL, LastName varchar(255) DEFAULT NULL, Email varchar(255) DEFAULT NULL, Salary varchar(255));
Expose data in JSON format
...