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 service services in WSO2 DSS.
Table of Contents maxLevel 3 minLevel 3
About the sample
The CSV file (Products.csv
), stored in the <DSS_HOME>/samples/resources/Products.csv
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 Data Services and Resources for a definition of datasources data services and operations.
Building the sample
The sample data service ,named CSVSampleService
should be deployed using the instructions in Samples Setup.
...
- Log in to the management console of your server and click List under Services in the navigator. The
CSVSampleService
will be listed here. - Click Try this service to open the TryIt tool.
- Select the "getProducts" operation and click Send to execute the request. You will get the a product list in the response as shown below.