This documentation is for WSO2 Carbon 4.4.3. View documentation for the latest release.
Page Comparison - Configuring a Custom Datasource (v.1 vs v.2) - Carbon 4.4.3 - WSO2 Documentation
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • Data Source Type: Custom
  • Custom Data Source Type: Specify whether the data is in a table or accessed through a query as described below.
  • Name: Enter a unique name for this datasource
  • Description: Description of the datasource
  • Configuration: XML configuration of the datasource

Custom datasource type

When creating a custom datasource, specify whether the datasource type is DS_CUSTOM_TABULAR (the data is stored in tables), or DS_CUSTOM_QUERY (non-tabular data accessed through a query). More information about each type are explained below.

Custom tabular datasources

Tabular datasources are used for accessing tabular data, that is, the data is stored in rows in named tables that can be queried later. To implement tabular datasources, the interface org.wso2.carbon.dataservices.core.custom.datasource.TabularDataBasedDS is used. For more information, see a sample implementation of a tabular custom datasource at InMemoryDataSource.

A tabular datasource is typically associated with a SQL data services query. WSO2 products use an internal SQL parser to execute SQL against the custom datasource. For more information, see a sample data service descriptor at InMemoryDSSample. Carbon datasources also support tabular data with the org.wso2.carbon.dataservices.core.custom.datasource.CustomTabularDataSourceReader datasource reader implementation. If you have Data Services Server installed, for more information see the <PRODUCT_HOME>\repository\conf\datasources\custom-datasources.xml file, which is a sample Carbon datasource configuration. 

Custom query datasources

Custom query-based datasources are used for accessing non-tabular data through a query expression. To implement query-based datasources, the org.wso2.carbon.dataservices.core.custom.datasource.CustomQueryBasedDS interface is used. You can create any non-tabular datasource using the query-based approach. Even if the target datasource does not have a query expression format, you can create and use your own. For example, you can support any NoSQL type datasource using this type of a datasource.