Carbon Datasources
A Carbon data source is an RDBMS or a custom data source created using the Data Sources sub menu of the Configuration menu in the management console. You can simply use that as the data source of a data service. A Carbon data source is persistent, and can be used whenever required. To create a Carbon data source, see Adding data sources .
After creating a Carbon data source, be sure to copy the JDBC driver to:
- <PRODUCT_HOME>/repository/components/lib directory
- <PRODUCT_HOME>/repository/components/dropins
For example, cp mysql-connector-java-5.XX-bin.jar /home/user/wso2ds/wso2-dataservices-XX/repository/components/lib.
Next, simply use that data source at the time a data service is created. That is, you must first follow the steps from 1 to 3 in creating a data service using various data sources. When you get to the Add New Data Source screen, select Carbon Data Source as the data source type. You get a drop-down list from which an existing Carbon data source can be selected as shown below.Â
To write a query to this data source, see Writing Data Service Queries.