Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Follow the instructions below to edit or delete an existing Data Source.

1. Log on

A datasource is a connection set up to a storage of data, such as a database or a data file, from a server. You can create a custom datasource as follows.

  1. Log in to the product's management console and
select "Data Sources."

Image Removed

2. Click on the "Edit" link associated with a particular data Source in the "Data Sources" page.

Image Removed

3. Edit the required options in the "Edit Data Source" page and click the "Save" button to apply the alterations.

4. To delete the data source, simply click the "Delete" link associated with a particular data Source in the "Data Sources" page.

Image Removed

5. Confirm your request by clicking "Yes."

Image Removed

Info
titleNote
You can't undo this operation once performed
  1. select Datasources sub menu from the Configure menu.
  2. Click Add Datasource.  
  3. The New Datasource page opens. Select Custom as the datasource type, provide a unique name, a description and configure the rest of the fields using the information below:

    • Custom Datasource Type : See below   
    • Configuration : XML configuration of the datasource
     

Custom datasource type
Anchor
CusDSType
CusDSType

The actual type of the custom datasource can be either DS_CUSTOM_TABULAR or DS_CUSTOM_QUERY. There are two options cover most of the common business use cases.  

Custom tabular datasources  

Tabular datasources are used to connect to a source that represents its data using tables, where a set of named tables contains data rows that can be queried later. Tabular datasources are implemented using the interface org.wso2.carbon.dataservices.core.custom.datasource.TabularDataBasedDS. See InMemoryDataSource for a sample implementation of tabular custom datasources.

A tabular datasource is typically associated with an SQL data services query. This is done by internally using our own SQL parser to execute SQL against the custom datasource. See InMemoryDSSample for a sample implementation.

An example configuration of a custom datasource of type DS_CUSTOM_TABULAR is shown below:

Image Added

Custom query datasources  

Custom query datasources are implemented using the interface org.wso2.carbon.dataservices.core.custom.datasource.CustomQueryBasedDS. See EchoDataSource for a sample implementation. See InMemoryDSSample for a sample data service descriptor with custom query datasources.  

In the init methods of all custom datasources, user-specified properties are parsed to initialize the datasources accordingly. In addition, a property named __DATASOURCE_ID__, which contains a UUID to uniquely identify the current datasource, is passed. Custom datasource authors use this property to identify the datasources. For example, in situations where datasource instances communicate within a server cluster for data synchronization.