RDBMS
RDBMS datasources allow you to create a data service using a relational database as the data storage type.
You can get the Add New Datasource screen shown below on the management console by executing steps 1 to 3 in creating a data service. Then, select RDBMS as the Datasource Type. It opens the RDBMS-specific options as shown below:Â
The options in the above screen are described below:
Data source type
There are two types of RDBMS data sources as follows:
- Default
For the default type, connection properties such as driver class, URL and credentials must be entered as shown in the example above. - External Data Source
If you need to add a data source supported by an external provider class such ascom.mysql.jdbc.jdbc2.optional.MysqlXADataSource
, select the external option and enter the name and value of connection properties by clicking Add Property. For example,
After an external data source is created, it can be used as a usual data source in queries.
Database engine
The database management system. In the above example, we take MySQL.
Driver class/URL
Depends on the database engine. You must copy the relevant JDBC driver to:
<PRODUCT_HOME>/repository/components/lib
directoryÂ
For example, cp mysql-connector-java-5.XX-bin.jar /home/user/wso2ds/wso2-dataservices-XX/repository/components/lib
.
Use as secret alias
For information, see Securing Passwords.
Datasource configuration parameters
For information, see Datasource Configuration Parameters.
Dynamic user authentication
For information, see Dynamic User Authentication.
To write a query to this data source, see Writing Data Service Queries.