This tutorial will guide you on how to expose data in a CSV file as a data service by using the Create New Data Service wizard. We will create a data service that can search for data on the file.
...
- Click Add New Datasource and enter values as shown below.
- Follow the instructions below to fill the datasource details.
- Datasource Id: Enter an ID for you datasource. We will enter CSV as the datasource Id.
- Datasource Type: Select CSV as the datasource type from the list. You can now specify the details of the CSV file.
- CSV File Location : Specify the path to your CSV file. In this tutorial, we are using a sample CSV file that is stored in the following location of your product distribution:
./samples/data-services/resources/Products.csv
. - Column Separator: Add 'comma' as the column separator.
- Start Reading From Row: Specify 2 to start reading from the second row.
- Contains Column Header Row : Select Select true from from the list.
- Header row : Enter '21' as the value.
- Save the datasource.
- Click Next to go to the Queries screen.
...
- Click Add New Operation to open the following screen.
- In the Operation Name field, enter a name for the operation.
- In the Query ID field, select the query that you created.
- Save the operation.
...