This is the WSO2 Data Services Server documentation version 2.6.3

CSV Sample

Usage of CSV files is an easy and a common way of storing simple tabular data. This sample demonstrates the usage of a CSV file as a data source in the WSO2 Data Services Server.

The sample data service CSVSampleService should be deployed using the instructions in Deploying Data Services section.

Running the Sample

The sample service can be run using the TryIt tool, which is bundled with the WSO2 Data Services Server, or a code-generated java client sample as discussed in the Data Services Clients section.

File and Service Description

The CSV file (CARBON_HOME/samples/resources/Products.csv) contains data about the products that are manufactured in an automobile company. Products refer to cars/motorocyles. The data table has "ID, Name, Classification, Price" columns.

The CSV data source based data service contains a single operation named getProducts to list all the products that are manufactured in the company.

Sample Run

Sample run of the service using the TryIt tool is shown below.