Versions Compared

Key

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

Using CSV files is an easy and common way of storing simple tabular data. This sample demonstrates the usage of a CSV file as a data source for data services in WSO2 DSSEnterprise Integrator (WSO2 EI).

Table of Contents
maxLevel3
minLevel3

About the sample

The CSV file (Products.csv), stored in the <DSS<EI_HOME>/samples/data-services/resources/ folder contains data about the products that are manufactured in an automobile company. Products refer to cars/motorocyles. The data table has the following columns: "ID", "Name", "Classification" and "Price". The sample data service used in this demonstration (CSVSampleService.dbs) contains a single operation named getProducts , which lists all the products that are manufactured in the company.

See About Data Services and Resourcesintegration for a definition of data services and operations.

Building the sample

The sample data service named CSVSampleService should be deployed using the instructions in Samples Setup.

Executing the sample

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

Follow the steps below to demonstrate this functionality using the TryIt tool:

...